W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <head> <script type="text/javascript"> function check(browser) { document.getElementById("answer").value=browser } </script> </head> <body> <p>您喜欢哪款浏览器?</p> <form> <input type="radio" name="browser" onclick="check(this.value)" value="Internet Explorer">Internet Explorer<br /> <input type="radio" name="browser" onclick="check(this.value)" value="Firefox">Firefox<br /> <input type="radio" name="browser" onclick="check(this.value)" value="Netscape">Netscape<br /> <input type="radio" name="browser" onclick="check(this.value)" value="Opera">Opera<br /> <br /> 您喜欢的浏览器是:<input type="text" id="answer" size="20"> </form> </body> </html>