请问如何在TextBox设置为MultiLine后,在Textbox文字中插入一段文字
请问如何在TextBox设置为MultiLine后,在Textbox文字中插入一段文字,可以使用javascript,也可以在后台写,如何作?
[解决办法]
<body> <form id= "form1 " runat= "server "> </form> <textarea id= "txt1 " rows= "20 " style= "width:200px "> 11111111111112222222222222222222 </textarea> <input type= "button " onclick= "javascript:return GoInsert(); " value= "Insert "/> </body> </html> <script> function GoInsert(){ var txt = document.getElementById( "txt1 "); txt.focus(); var range = document.selection.createRange(); range.text += "DDDDDDDD "; //return false;} </script>