其实这个用JS来写是很简单的,分享代码如下:
- <script type="text/javascript">
- function confirmBox(){
- if(document.getElementById("checked").checked==true)
- {
- document.getElementById("submitBtn").disabled="";
- }else{
- document.getElementById("submitBtn").disabled="disabled";
- }
- }
- </script>
- <li><input id="checked" type="checkbox" onclick="confirmBox()"/> 同意注册协议</li>
- <li><input id="submitBtn" type='submit' name='Submit' value='注 册' class="insub" disabled="disabled"></li>