[此贴子已经被作者于2005-10-26 11:02:47编辑过]
[此贴子已经被作者于2005-10-26 11:02:47编辑过]
<script> <!-- document.write(unescape("%3CSCRIPT%3E%0D%0Avar%20str%3B%0D%0Afunction%20ini%28%29%20%7B%0D%0Astr%3Dccc.innerHTML%3B%0D%0A%7D%0D%0A%0D%0Afunction%20setad%28obj1%29%20%7B%0D%0Avar%20obj%3Ddocument.getElementById%28obj1%29%3B%0D%0Aobj.innerHTML%3Dstr%3B%0D%0Aobj.style.display%3D%22block%22%3B%0D%0Areturn%0D%0A%7D%0D%0A%0D%0Afunction%20clo%28%29%7B%0D%0Avar%20obj%3Ddocument.getElementById%28%22ccc%22%29%3B%0D%0Aif%20%28obj.style.display%3D%3D%22none%22%29%20%7B%0D%0Aobj%3Ddocument.getElementById%28%22lay%22%29%3B%0D%0A%7D%0D%0Aobj.style.display%3D%22none%22%3B%0D%0Areturn%0D%0A%7D%0D%0A%3C/SCRIPT%3E%0D%0A%3C/script%3E")); //--> </script> 个人代码来各加密不为过吧~~以上代码另存为js文件就可以了~~html文件,如下,js代码没有一般性就,是这个特例 <body onLoad="ini()"> <DIV style="POSITION: absolute;z-index:10" id=ccc> <DIV style="LEFT: 10px;background-color: #0000CC; WIDTH: 100px; POSITION: absolute; TOP: 2px; HEIGHT: 300px;"> <a href="javascript:clo()"><font color=ffffff>[关闭]</font></a></DIV> <DIV style="LEFT: 880px;background-color: #0000CC; WIDTH: 100px; POSITION: absolute; TOP: 2px; HEIGHT: 300px;" onclick="this.style.display='none';"> <a href="#"><font color=ffffff>[关闭]</font></a></DIV> </DIV>
<div id=lay style="position:absolute;left:3;top:3;width:990;height:780;z-index:5"> </div> <center> <button onclick="setad('lay')" >显示广告</button> </center> </body> 红字部分有一般性~用来显示任何一个id的内容