W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <body> <form id="myForm" method="get" name="myForm"> Name: <input type="text" size="20" value="Bill Gates" /> </form> <script type="text/javascript"> document.write("Form name: "); document.write(document.getElementById('myForm').name); </script> </body> </html>