导航
首页
站内首页
网罗天下
网页前端
软件使用
站内首页
>
网页前端
>
JS
> 正文
虚拟弹窗代码
<script> var gourl='https://pic1.xuehuaimg.com/proxy/http://www.netton.cn'; var nettonadurl="http://www.netton.cn/xn/"; var nettonadWidth="780"; var nettonadHeight="520"; var frequencyCap = 1; var str=""; str=str+"<table border='0' id='ads' WIDTH="+nettonadWidth+" cellspacing='0' cellpadding='0' HEIGHT="+nettonadHeight+" >"; str=str+"<tr><td height='31'><div id=add><table border='0' width="+nettonadWidth+" cellspacing='0' cellpadding='0' background='"+nettonadurl+"/images/window_04.gif' height='31'>"; str=str+"<tr ><td width='25'><img src='"+nettonadurl+"/images/window_01.gif' width='25' height='31' ></td>"; str=str+"<td><font color='#FFFFFF'><span style='font-size: 10pt'><b>页面展示广告--Netton.Cn提供</b></span></font></td>"; str=str+"<td><img src='"+nettonadurl+"/images/window_03.gif' width='220' height='31' ></td>"; str=str+"<td width='100' align='right' style='cursor:hand'><a href='#' onclick='nettonadClose();return false;'><img border=0 alt='MIN' src='"+nettonadurl+"/images/window_06.gif' width='25' height='31'></a>"; str=str+"<a href='#' onclick='window.open(\""+gourl+"\");nettonadClose();return false;'><img border=0 alt='MAX' src='"+nettonadurl+"/images/window_07.gif' width='23' height='31'>"; str=str+"<a href='#' onclick='nettonadClose();return false;'><img border=0 alt='CLOSE' src='"+nettonadurl+"/images/window_08.gif' width='28' height='31'></a></td>"; str=str+"</tr></table></div></td></tr><tr><td><table border='0' width='100%' cellspacing='0' height='100%' cellpadding='0'>"; str=str+"<tr><td width='8' background='"+nettonadurl+"/images/window_09.gif'> </td>"; str=str+"<td><iframe width='100%' height='100%' src='"+gourl+"' border=0 frameborder=0 scrolling=auto></iframe></td>"; str=str+"<td width='8' background='"+nettonadurl+"/images/window_11.gif'></td>"; str=str+"</tr></table></td></tr>"; str=str+"<tr><td width='100%' height='3' background='"+nettonadurl+"/images/window_13.gif'></td></tr></table>"; function nettonadClose() { if (navigator.appName == "Netscape") { eval("ads.style.display=\"none\";"); nettonad_right.style.visibility='visible'; if(document.getElementById) { document.getElementById("nettonad").visibility="hidden"; } else { document.nettonad.visibility="hidden"; nettonad_right.style.visibility='visible'; } } else { eval("ads.style.display=\"none\";"); nettonad.style.visibility='hidden'; nettonad_right.style.visibility='visible'; } } function nettonadOpen() { if (navigator.appName == "Netscape") { eval("ads.style.display=\"\";"); nettonad_right.style.visibility='hidden'; if(document.getElementById) { document.getElementById("nettonad").visibility="visible"; } else { document.nettonad.visibility="visible"; } } else { eval("ads.style.display=\"\";"); nettonad.style.visibility='visible'; nettonad_right.style.visibility='hidden'; } } function setCookie(cookieName,cookieValue, expirehours) { if (frequencyCap > 0) { var today = new Date(); var expire = new Date(); expire.setTime(today.getTime() + 3600000 * frequencyCap); document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString(); } else { document.cookie = cookieName+"="+escape(cookieValue); } } function ReadCookie(cookieName) { var theCookie=""+document.cookie; var ind=theCookie.indexOf(cookieName); if (ind==-1 || cookieName=="") return ""; var ind1=theCookie.indexOf(';',ind); if (ind1==-1) ind1=theCookie.length; return unescape(theCookie.substring(ind+cookieName.length+1,ind1)); } function cn_right() { cn_diffY=document.body.scrollTop; cn_percent=.1*(cn_diffY-rightScrollX); if(cn_percent>0) cn_percent=Math.ceil(cn_percent); else cn_percent=Math.floor(cn_percent); document.all.nettonad_right.style.pixelTop+=cn_percent;rightScrollX=rightScrollX+cn_percent; } if (ReadCookie("virtualwindow") != "yes0") { if (navigator.appName == "Netscape") { var code="<span id='nettonad' onmousedown='nettonaddown=true;nettonaddivleft=event.clientX-parseInt(nettonad.style.left);nettonaddivtop=event.clientY-parseInt(nettonad.style.top)' onmouseup='nettonaddown=false' style='POSITION: absolute;Z-INDEX: 9876543210; left: "+(window.screen.width-nettonadWidth)/2+"; TOP: 10px;' WIDTH="+nettonadWidth+" HEIGHT="+nettonadHeight+" >"+str+"</span>"; } else { var code="<DIV ID='nettonad' onmousedown='nettonaddown=true;nettonaddivleft=event.clientX-parseInt(nettonad.style.left);nettonaddivtop=event.clientY-parseInt(nettonad.style.top)' onmouseup='nettonaddown=false' style=' POSITION: absolute;Z-INDEX: 9876543210; left: "+(window.screen.width-nettonadWidth)/2+"; TOP: 10px;width:"+nettonadWidth+";height:"+nettonadHeight+";'>"+str+"</DIV>"; } document.write(code); if(self!=top) setCookie("virtualwindow","no", frequencyCap); else setCookie("virtualwindow","yes", frequencyCap); document.write("<body>"); var rightcode="<DIV id='nettonad_right' style='right: 5px; POSITION: absolute; TOP: 5px;visibility: hidden;' ><a href='#' onclick='nettonadOpen();return false;'><img alt='OPEN AD' src="+nettonadurl+"/images/right.gif border=0 height=19 width=19></a></DIV>"; document.write(rightcode);rightScrollX=0; window.setInterval("cn_right()",1); }</script>
提示:可以修改后运行.
<<
bcastr3.1 通用图片轮换播放器
JavaScript 仿LightBox内容显示效果
>>
查看所有评论
昵称
评论内容
相关文章
在线留言
© 2021
i0561搜索
.All rights reserved.
v3.24
作者:
Netton
浏览:
发布时间:
08/12/02