fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <script> function displayResult(browser){ document.getElementById("result").value=browser } </script> </head> <body> <p>选择你最喜欢的浏览器:</p> <form> <input type="radio" name="browser" onclick="displayResult(this.value)" value="Internet Explorer">Internet Explorer<br> <input type="radio" name="browser" onclick="displayResult(this.value)" value="Firefox">Firefox<br> <input type="radio" name="browser" onclick="displayResult(this.value)" value="Opera">Opera<br> <input type="radio" name="browser" onclick="displayResult(this.value)" value="Google Chrome">Google Chrome<br> <input type="radio" name="browser" onclick="displayResult(this.value)" value="Safari">Safari<br><br> 你最喜欢的浏览器是: <input type="text" id="result"> </form> </body> </html>
运行结果