<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>广告</title>
<style type="text/css">
img{
110px;
}
#left{
left:0;
}
#right{
right:0;
}
</style>
</head>
<body>
<p>5s之后自动关闭广告</p>
<img src="img/1.jpg" alt="" id="left"/>
<img src="img/2.jpg" alt="" id="right"/>
</body>
</html>
<script type="text/javascript">
function fun(){
document.getElementById("left").style.display="none";
document.getElementById("right").style.display="none";
}
setTimeout("fun()",5000);
</script>