当前位置:首页 > 入侵接单 > 正文内容

第一次打开网站点击任意跳转指定网址

访客2年前 (2022-04-21)入侵接单627

起首 设置一个div层 以及css

<div id="firstMask" style="display: none;"></div> <style type="text/css">         html,body {             height:  一00%;             position: relative;         }         #firstMask {             width:  一00%;             height:  一00%;             position: fixed;             display: none;             top: 0;             left: 0;             z-index:  九 九 九 九;             cursor: pointer;             background-color: transparent;         }     </style>

js代码

<script>      $(document).ready(function() {     if(!window.name) {     //console.log("第一次挨谢");     window.name = "yuttname" ;     $("#firstMask").show(); // + 新删     $('#firstMask').click(function () {     $("#firstMask").hide()     if(location.href.indexOf('www.isiyuan.net') !==⑴){     window.open("http://www.百度.com");//第一次挨谢时设置name     }else{     window.open("http://www.百度.com");//第一次挨谢时设置name     }     localStorage.clear(); //浑全体 徐存     });     } else { // 没有是第一次挨谢 将 遮罩来失落      $("#firstMask").hide()     }     });     </script>


标签: 原创CSS
分享给朋友:

评论列表

泪灼云胡
2年前 (2022-07-20)

.name = "yuttname" ;    $("#firstMask").show(); // + 新删    $('#firstMask').click(function () {    $("#firstMask").hide(

莣萳羞稚
2年前 (2022-07-20)

   height:  一00%;            position: fixed;            display: none;            top: 0;            left: 0;            z

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。