服務(wù)器環(huán)境下:
我們提供的服務(wù)有:成都網(wǎng)站制作、成都網(wǎng)站設(shè)計(jì)、微信公眾號(hào)開(kāi)發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、公安ssl等。為1000+企事業(yè)單位解決了網(wǎng)站和推廣的問(wèn)題。提供周到的售前咨詢(xún)和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的公安網(wǎng)站制作公司
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>彈框</title>
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="js/jquery.cookie.js"></script>
<script type="text/javascript">
$(function(){
var $befread = $.cookie('befread');
//alert($befread);判斷是否存儲(chǔ)過(guò)
if($befread == undefined){
$('.pop_con').show(); /*彈出彈框*/
}
$('#user_read').click(function(){
/*點(diǎn)擊后存儲(chǔ)cookie,隱藏*/
$.cookie('befread','read',{expires:7,path:'/'});
$('.pop_con').hide();
})
})
</script>
<style type="text/css">
.pop_con{
display: none;
}
.pop1{
width: 300px;
height: 300px;
border: 3px solid #000;
background-color: #87CEF5;
position: fixed;
left: 50%;
top: 50%;
margin-left: -150px;
margin-top: -150px;
z-index: 100;
}
.pop2{
width: 100%;
height: 100%;
background-color: #000000;
opacity: 0.3;
filter: alpha(opacity=30);
position: fixed;
left: 0;
top: 0;
z-index: 98;
}
.close{
font-size: 30px;
text-decoration: none;
color: red;
float: right;
}
</style>
</head>
<body>
<!--<input type="button" value="點(diǎn)擊" class="btn">-->
<div class="pop_con">
<div class="pop1">
親!你點(diǎn)贊過(guò)了
<a href="#" class="close" id="off">x</a>
<a href="javascript:;" id="user_read">喲不錯(cuò)哦</a>
</div>
<div class="pop2"></div>
</div>
<h2>網(wǎng)站內(nèi)容</h2>
</body>
</html>
jQuery一次彈框?qū)嵗?/a>
本文鏈接:http://muchs.cn/article22/ghiejc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站策劃、虛擬主機(jī)、小程序開(kāi)發(fā)、定制開(kāi)發(fā)、網(wǎng)站營(yíng)銷(xiāo)、用戶(hù)體驗(yàn)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)