8.7w+
社区成员
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<input type="radio" id="agree"> 同意 <br>
<input type="button" id="nextStep" value="下一步">
<script type="text/javascript">
var agree = document.getElementById( "agree" );
var nextStep = document.getElementById( "nextStep" );
nextStep.onclick = function () {
if ( ! agree.checked ) {
alert( "请先同意条款!" );
return;
}
location.href = "http://www.baidu.com";
};
</script>
</body>
</html>