服务器环境下:
& lt; !doctype html>
& lt; html>
& lt; head>
& lt;元charset=皍tf-8"在
& lt; title>弹框& lt;/title>
& lt;脚本类型=拔谋?javascript"src=https://www.yisu.com/zixun/" js/jquery-3.3.1.min.js "> 脚本>
& lt;脚本类型=拔谋?javascript"src=https://www.yisu.com/zixun/" js/jquery.cookie.js "> 脚本>
& lt;脚本类型=拔谋?javascript"在
<代码> $(函数(){ var befread=.cookie美元(“befread”);//警报($ befread);判断是否存储过 如果($ befread==未定义){ $ (' .pop_con '),告诉();/*弹出弹框*/} $ (' # user_read ') .click(函数(){/*点击后存储cookie,隐藏*/.cookie美元(‘befread’,‘读’,{到期:7,路径:'/'}); $ (' .pop_con ') hide (); }) }) & lt;/script> 代码>
& lt;风格类型=拔谋?css"在
<代码> .pop_con { 显示:没有; } .pop1 { 宽度:300 px; 身高:300 px; 边界:3 px固体# 000; background - color: # 87 cef5; 位置:固定; 左:50%; 上图:50%; margin-left: -150 px; margin-top: -150 px; z - index: 100; } .pop2 { 宽度:100%; 高度:100%; background - color: # 000000; 透明度:0.3; 过滤器:α(不透明度=30); 位置:固定; 左:0; 上图:0; z - index: 98; } .close { 字体大小:30 px; 文字修饰:没有; 颜色:红色; 浮:正确; } & lt;/style> 代码>
& lt;/head>
& lt; body>
<代码> & lt; !——& lt;输入类型=鞍磁ァ奔壑?" https://www.yisu.com/zixun/点击”类=癰tn祝辞——比; & lt; div类=皃op_con”比; & lt; div类=皃op1”比; 亲!你点赞过了 & lt; a href=" https://www.yisu.com/zixun/" class="关闭" id=肮乇铡弊4莤 javascript: & lt; a href="; " id=" user_read祝辞哟不错哦& lt;/a> & lt;/div> & lt; div类=" pop2 "祝辞& lt;/div> & lt;/div> & lt; h2>网站内容& lt;/h2> 代码>
& lt;/body>
& lt;/html>