跳转到下一页面时,必须先勾选阅读xx须知/协议才可跳转功能

当跳转到新的html页面时,先判断checkbox是否选中,选中-->跳转到新页面;未选中--弹出提示消息(请先同意须知)

HTML:

1 <div class="choose">
2    <input class="check checkSty" id="agreeOrNot" type="checkbox"/>
3    <div class="notic">我已阅读并同意须知内容div>
4  div>
5  
6  <a href="number.html">
7    <div class="sub btn" onclick = "return enter();">前往排队取号div>
8  a>

js:

注:需要引入layer.css和layer.js两个文件

转载于:https://www.cnblogs.com/renxiao1218/p/11334032.html

你可能感兴趣的:(跳转到下一页面时,必须先勾选阅读xx须知/协议才可跳转功能)