1. 程式人生 > >定時彈出圖片

定時彈出圖片

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			function hide(){
				var a=document.getElementById("img")
				img.style.display="none"
			}
			function show(){
				var a=document.getElementById("img")
				img.style.display="block"
				setTimeout("hide()",3000)
			}
			function init(){
				setTimeout("show()",3000)
			}
		</script>
	</head>
	<body onload="init()">
		<img id="img" src="img/4.jpg" width="70%" style="display: none;"/>
	</body>
</html>

圖片自己弄