Textarea 操作

<input value="51js.com" onclick="alert(this.createTextRange().boundingWidth);">

<input value="51js.com" style="width:185px; border:solid 1px #999999"

onpropertychange="this.style.posWidth=this.createTextRange().boundingWidth;">

 

<textarea id="neirong" name="neirong" style="width:185px;height:36px;overflow:hidden; border:solid 1px #999999" onpropertychange="if(this.scrollHeight>36){this.style.posHeight=this.scrollHeight}else{this.style.posHeight=36}"></textarea>

 <input type="text" style="width: 50; overflow: visible">

 

<textarea id="neirong" name="neirong" style="width:185px;height:36px;overflow:hidden; border:solid 1px #999999;overflow: visible" ></textarea>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章