代码:
<div style="position: relative; 800px; display: block; height: 600px; margin-left: -400px; top: -4100px; left: 50%" id="clintADV">
<div style="position: relative; margin-left: 380px; cursor: hand; left: 50%"><img onclick="CloseADV()" alt="关闭" src="images/close.jpg" /></div>
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='800' height='600'><param name='movie' value='/ad/20111201/fld.swf' /><param name='quality' value='high' /><embed src='/ad/20111201/fld.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='800' height='600'></embed></object></div>
<p><script type="text/javascript">
var getId=document.getElementById("clintADV");
function PlayADV()
{
setTimeout("CloseADV()",30000);getId.style.display="block";
}
function CloseADV()
{
getId.style.display="none";
}
setTimeout("PlayADV()",5000);
</script>
setTimeout:在指定的毫秒后执行函数。 setTimeout(函数或脚本,毫秒数)
播放Demo:神州乐器网