代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script type="text/javascript"> window.onload = function (ev) { // 选中数学 document.getElementById("math").selected = true; // 选中西瓜 document.getElementById("watermelon").checked = true; } </script> </head> <body> <select name="subject"> <option value="chinese">语文</option> <option value="math" id="math">数学</option> <option value="english">英语</option> </select> <input type="radio" name="fruit" value="apple" />苹果 <input type="radio" name="fruit" value="peach"/>桃子 <input type="radio" name="fruit" value="watermelon" id="watermelon"/>西瓜 </body> </html> 结果: