为了将来参考,还有一个没有jQuery的解决方案-仅使包装div样式包含
overflow:hidden并使用以下Javascript两行代码:
// get the width of the textarea minus scrollbarvar textareaWidth = document.getElementById("textarea").scrollWidth;// width of our wrapper equals width of the inner part of the textareadocument.getElementById("wrapper").style.width = textareaWidth + "px";

![隐藏滚动条,同时仍然可以使用鼠标/键盘滚动[重复] 隐藏滚动条,同时仍然可以使用鼠标/键盘滚动[重复]](http://www.mshxw.com/aiimages/31/420764.png)
