这段代码的枋心代码是onkeydown ="if(event.keycode==13) return false; " oninput="this.style.height='0px';this.style.height=(this.scrollheight+'px');" onpropertychange="this.style.height=(this.scrollheight+'px')"
根据用户的按钮来判断内容与高度的。
<meta charset = "utf-8" />
<style type = "text/css教程">
.editable{cursor:text; font-size:13px; color:#003366;width:80px;line-height:20px;height:20px;font-family:arial;cursor:text;*overflow-y:hidden; }
</style><textarea class='editable' onkeydown ="if(event.keycode==13) return false; " oninput="this.style.height='0px';this.style.height=(this.scrollheight+'px');" onpropertychange="this.style.height=(this.scrollheight+'px')" /></textarea>
时间: 2024-09-22 09:45:30