日期:2014-05-16 浏览次数:20443 次
<body> <script language="javascript" type="text/javascript"> function enabledisable() { if(input.getAttribute('disabled')) { input.removeAttribute('disabled'); document.getElementById('enadisinp').value='disable'; } else { input.setAttribute('disabled','disabled'); document.getElementById('enadisinp').value='enable'; } } </script> <input disabled="disabled" id="inp" /> <br /> <input id="enadisinp" type="button" value="enable" onClick="enabledisable()" /> <script language="javascript"> var input=document.getElementById('inp'); </script> </body>