【发布时间】:2018-03-21 17:29:32
【问题描述】:
我有一个弹出消息,每次用户访问我的网页时都会显示。这很烦人,我只想显示一次弹出消息。该怎么做?
<script>
$(document).ready(function () {
$("#popup").hide().fadeIn(1000);
//close the POPUP if the button with id="close" is clicked
$("#close").on("click", function (e) {
e.preventDefault();
$("#popup").fadeOut(1000);
});
});
</script>
<!-- Pop up message -->
<link href="myhome/popup.css" rel="stylesheet" type="text/css"/>
<div class="body-popup" style="height: 100%; width: 100%; background-color: black">
<div id="popup">
<div id="close" class="alert alert-info alert-dismissable">
<button type="button" class="pull-right close" data-dismiss="alert" aria-hidden="true">×</button>
CLOSE
<img src="/myhome/assets/img/prom.jpg" alt="popup" class="image-pop"/>
</div>
</div>
</div>
【问题讨论】:
标签: javascript html laravel