问题描述
我是JS的新手,在看似明显的问题上遇到了困难。我想重置文本区域的高度以适合其中的预填充内容。由于某些原因,它始终设置为0或12像素。在尝试调试时,我将问题归结为以下内容:
var scrollElement=jQuery(".comp-info textarea")[0];
console.dir(scrollElement);
var scrollElementHeight=scrollElement.scrollHeight;
console.log(scrollElementHeight);
运行此命令后,在控制台中,我看到console.dir集合(?)中的scrollHeight为250,但console.log(scrollElementHeight)显示为0。
我在这里误会什么?
非常感谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)