<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>jQuery广告弹窗</title>
<script type="text/javascript" src="js/jquery-3.3.1.js"></script>
<style type="text/css">
#ad{
width:300px;
height:300px;
background-color:antiquewhite;
position:fixed;
bottom:0;
right:0;
display:none;
}
</style>
<script type="text/javascript">
setTimeout(function(){
$("#ad").show();
},3000);
setTimeout(function(){
$("#ad").hide();
},5000);
$(function(){
$("#closeBtn").click(function(){
$("#ad").hide();
});
});
</script>
</head>
<body>
<div id="ad">
<button id="closeBtn">关闭</button>
</div>
</body>
</html>