<script> function test(){document.getElementById("TextBox2").value+="aaa\n"; }</script><body> <textarea id = "TextBox2"> </textarea> <input type ="button" value = "test" onclick = "test()"/> </body>我测试了,没有问题啊
<script> var i =0; function test(){ document.getElementById("TextBox2").value+=i+"\n"; i++; } </script> <body> <textarea id = "TextBox2"> </textarea> <input type ="button" value = "test" onclick = "test()"/> </body>火狐和ie都没问题
难道是我RP有问题? 没有换行效果 IE8中
<script> var i =0; function test(){ document.getElementById("TextBox2").value+=i+"\r\n"; i++; } </script> <body> <textarea id = "TextBox2"> </textarea> <input type ="button" value = "test" onclick = "test()"/> </body>
document.getElementById("TextBox2").value+=array+"<br>";
<br>标签当做字符串使用
<script>
function test(){document.getElementById("TextBox2").value+="aaa\n";
}</script><body>
<textarea id = "TextBox2">
</textarea>
<input type ="button" value = "test" onclick = "test()"/>
</body>我测试了,没有问题啊
var i =0;
function test(){
document.getElementById("TextBox2").value+=i+"\n";
i++;
}
</script>
<body>
<textarea id = "TextBox2">
</textarea>
<input type ="button" value = "test" onclick = "test()"/>
</body>火狐和ie都没问题
var i =0;
function test(){
document.getElementById("TextBox2").value+=i+"\r\n";
i++;
}
</script>
<body>
<textarea id = "TextBox2">
</textarea>
<input type ="button" value = "test" onclick = "test()"/>
</body>