让图层定时消失的效果

2009-03-30 07:28:54 | 【

本脚本通过setTimeOut函数,让一个指定的图层在一段时间后自动消息

查看全部代码 View Code

在网页<head>区添加以下代码

<body onLoad=setTimeout("abc.style.display='none'",10000)>
<div id="abc" style="position:absolute; left:61px; top:101px; width:149px; height:149px; z-index:1">
  <table width="111" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCFF66">
    <tr>
      <td> </td>
    </tr>
    <tr>
      <td> </td>
    </tr>
    <tr>
      <td> </td>
    </tr>
  </table>
</div>


其中脚本在<body>的OnLoad事件中加载

相关资源