<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>关闭二维码</title>
<style>
.box{
width:400px;
border-bottom:1px solid #ccc;
margin:100px auto; }
.close-btn{
position:absolute;
top:89px;
left:580px;
width:14px;
height: 14px;
border:1px solid #ccc;
line-height:14px;
font-family:Arial, Helvetica, sans-serif;
cursor:pointer;
}
</style>
</head>
<body>
<div class="box" >
淘宝二维码
<img src="./btn1.PNG" />
<i class="close-btn">X</i>
</div>
<script>
var btn=document.querySelector(".close-btn");
var box=document.querySelector(".box");
btn.onclick=function(){
box.style.display="none";
}
</script>
</body>
</html>
js关闭二维码
最新推荐文章于 2022-05-04 22:17:09 发布