TEXTAREA自适应文字行数的多少
<textarea rows=1 name=s1 cols=27 onpropertychange="this.style.posHeight=this.scrollHeight">
</textarea>
<textarea rows=1 name=s1 cols=27 onpropertychange="this.style.posHeight=this.scrollHeight">
</textarea>
<textarea rows=1 name=s1 cols=27 onpropertychange="this.style.posHeight=this.scrollHeight">
</textarea>
<textarea rows=1 name=s1 cols=27 onpropertychange="this.style.posWidth=this.scrollWidth">
</textarea>
很奇怪的结果
<style>
textarea{
font:14px
}
</style>
</head>
<BODY >
<iframe frameborder=NO height="124" width="190" name=kxt scrolling=no src="http://www.cnstock.com/hangqing/hangqing.htm"></iframe>
<textarea rows=1 name=s1 cols=27 onpropertychange="this.style.posHeight=this.scrollHeight" onclick="alert((this.scrollHeight-2)/16)">
</textarea>
在JAVASCRIPT中怎么得到屏幕的长度呢(像素)?
alert(screen.width); //屏幕区域大小
alert(screen.availWidth); //屏幕工作区域大小
</script>
不好意思!