<html>随着文字输入增加自动增高文本框的代码

2013-09-06 09:17:34 -0400

<form action="提交地址" method="POST"><textarea name="txt" style="overflow-y:hidden;height:60px; " onpropertychange="this.style.height=this.scrollHeight + 'px'" oninput="this.style.height=this.scrollHeight + 'px'">输入文字</TEXTAREA><br><input type="submit" value="提交"><br>



输入几个回车试试
代码演示
«Newer      Older»
Comment:
Name:

Back to home

Subscribe | Register | Login | N