运行 ❯
获取您
自己
的网站
×
更改方向
保存代码
更改主题,深色/浅色
前往空间
<!DOCTYPE html> <html> <body> <form action="/action_page.php"> Address:<br> <textarea id="myTextarea" rows="2" cols="20" name="usrtxt" wrap="hard"> At W3Schools you will find free Web-building tutorials. </textarea> <input type="submit"> </form> <p>Click the "Try it" button to display the value of the wrap attribute of the text area.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myTextarea").wrap; document.getElementById("demo").innerHTML = x; } </script> </body> </html>