<pre name="code" class="html"><html>
<head>
<script>
function asd(){
var reg=document.getElementsByName("reg");
if(reg[0].checked){
document.getElementById("submit").disabled=false;
}
else {
document.getElementById("submit").disabled=true;
}
}
</script>
</head>
<body>
<input name="reg" type="checkbox" onclick="asd();" />阅读了吗?
<input type="submit" value="注册" id="submit" disabled/>
</body>
</html></pre><br>
<br>
<pre></pre>
<pre></pre>