<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<style type="text/css">
a {
color: black;
text-decoration: none;
}
.co {
width: 300px;
height: 300px;
display: block;
background-color: saddlebrown;
}
</style>
</head>
<body>
<div id="">
<a href="#"><i>+</i></a>
<div class="co">
</div>
</div>
<script type="text/javascript">
var dele = document.querySelector('a');
var co = document.querySelector('.co')
dele.onclick = function(){
co.style.display = 'none'
dele.style.display = 'none'
}
</script>
</body>
</html>
广告图片点击删除
猜你喜欢
转载自blog.csdn.net/weixin_60789461/article/details/123611170
今日推荐
周排行