读书人

一html解决思路

发布时间: 2012-02-04 15:43:09 作者: rapoo

一html
html中有一
<textarea name= "to " rows= "2 " cols= "20 " id= "SendForm_txtMessage " class= "textfield " style= "width: 450px; height: 100px; margin-bottom: 4px; "> </textarea> <br>

有一
<input name= "SendForm$txtTo " type= "text " maxlength= "150 " id= "SendForm_txtTo " class= "textfield " style= "width:175px; margin-bottom: 4px; " />


如何令用家在入textarea後, 自覆 textarea的容至text

[解决办法]
<form name= "form1 ">
<textarea onpropertychange= "this.form.SendForm$txtTo.value = this.value; " name= "to " rows= "2 " cols= "20 " id= "SendForm_txtMessage " class= "textfield " style= "width: 450px; height: 100px; margin-bottom: 4px; "> </textarea>
<input name= "SendForm$txtTo " type= "text " maxlength= "150 " id= "SendForm_txtTo " class= "textfield " style= "width:175px; margin-bottom: 4px; " />
</form>
[解决办法]
onpropertychange= "this.form.SendForm$txtTo.value = this.value; "

楼上的正确

读书人网 >CSS

热点推荐