JS
<script>
function check(){
if(!document.getElementById("EULA").checked){
alert("请阅读《最终用户许可协议》,勾选复选框后提交!");
return false
};
return true
}
</script>
Form
<form id="form1" name="form1" method="post" action="">
<label>
<input type="checkbox" name="EULA" id="EULA" /> 我已阅读并了解 <a href="./help/onlyforEULA.php">《最终用户许可协议》</a>
</label>
<label>
<input type="submit" name="button" id="button" value="提交" onclick="return check()" />
</label>
</form>
0 条评论