一个点击劫持的demo

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
#father{
position:relative;
}
#dj{
position:absolute;
top:0px;
left:10px;
height:100%;
width:100%;
z-index:10;
left:0px;
}
#imgdiv{
text-align:center;
z-index:0;
}
</style>
<script>
function fun(){
window.open("https://www.baidu.com");
}
</script>
</head>
<body>
<div id="father">
<div id="imgdiv">
<img src="./timg.jpg" alt="">
</div>
<div id="dj" onclick="fun()">
</div>
</div>
</body>
</html>
  • Copyrights © 2018-2021 rich4rd
  • Visitors: | Views: