日期:2014-05-18 浏览次数:20725 次
<html> <head> <title>Sample</title> <script type="text/javascript"> function change(){ var _text=document.getElementById("text"); if(radio[0].checked){ _text.disabled=true; } if(radio[1].checked){ _text.disabled=false; } } </script> </head> <body> <input type=radio name="radio" CHECKED onclick="change();" />First <input type=radio name="radio" onclick="change();" />Second <br/> <input type="text" id="text" value="文本框" disabled="true"/> </body> </html>