首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

一個html問題解决思路

2012-02-04 
一個html問題html中有一個textareaname to rows 2 cols 20 id SendForm_txtMessage class

一個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; "

楼上的正确

热点排行