<form>
<input id="checked" type="checkbox" /><label for="checked">贊成《註冊協議》</label></li>
<input type="submit" id="register" name="Submit" value="注 冊" class="input_sub" onclick="registerFun()" />
</form>javascript
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>java
<script type="text/javascript">
$(document).ready(function(){
var checked=$("#checked")
var register=$("#register")
register.onclick=function(){
if(checked.checked==true){
alert("成功");
}else{
alert("請勾選<通力經紀人協議>");
return false
}
}
})
</script>jquery