87,955
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
<!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>