找回密码
 立即注册
搜索
查看: 79|回复: 0

谁帮助我看下广告代码?

[复制链接]

842

主题

802

回帖

2145

积分

论坛元老

积分
2145
发表于 2008-9-19 10:11:37 | 显示全部楼层 |阅读模式
谁帮助我看下广告代码?

一天一次 点空白页面也弹出代码,我在一个网应用有效,我想同时在多个网站应用,当第一次能生效后,再访问其他使用过代码的网站就无效了,是不是要区别cookie的名称呢?

我在 http://www.mhbz.com/ 这里用了,调用代码 <script language="JavaScript" src="/skin/tan.js" type="text/JavaScript"></script>
又在 http://www.51kan.com/ 用了,调用代码<script language="JavaScript" src="http://www.mhbz.com/skin/tan_51kan.js" type="text/JavaScript"></script>

打开 http://www.mhbz.com/ 这个网站后广告代码有效,再打开http://www.51kan.com就无效了,
  1. <!--
  2. var Then = new Date();
  3. Then.setTime(Then.getTime() + 24*60*60*1000 ); //秒分
  4. var cookieString = new String(document.cookie);
  5. var cookieHeader = 'POPWIN' ;
  6. var beginPosition = cookieString.indexOf(cookieHeader);
  7. if (beginPosition == -1)
  8. {
  9.         var newtop=0
  10.         var newleft=0
  11.         if (navigator.appName == 'Netscape' ) {
  12.                 layerStyleRef="layer.";
  13.                 layerRef="document.layers";
  14.                 styleSwitch="";
  15.                 }
  16.                 else
  17.                 {
  18.                 layerStyleRef="layer.style.";
  19.                 layerRef="document.all";
  20.                 styleSwitch=".style";

  21.                 }
  22.         var autoclick_ok=false;
  23.         function toExit(){
  24.                 autoclick_ok=true;
  25.                 document.cookie = "Cookie9=POPWIN;expires="+ Then.toGMTString() +";path=/";
  26.     }

  27.         function doMouseMove() {

  28.                 layerName = 'iit'
  29.                 eval('var curElement='+layerRef+'["'+layerName+'"]')
  30.                 eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"')
  31.                
  32.                 if(!autoclick_ok)
  33.                 {
  34.                         eval('curElement'+styleSwitch+'.visibility="visible"')
  35.                 }else{
  36.                         eval('curElement'+styleSwitch+'.visibility="hidden"')
  37.                 }
  38.                
  39.                 eval('newleft=document.body.clientWidth-curElement'+styleSwitch+'.pixelWidth')
  40.                 eval('newtop=document.body.clientHeight-curElement'+styleSwitch+'.pixelHeight')
  41.                 eval('height=curElement'+styleSwitch+'.height')
  42.                 eval('width=curElement'+styleSwitch+'.width')
  43.                 width=parseInt(width)
  44.                 height=parseInt(height)
  45.                 if (event.clientX > (document.body.clientWidth - 10 - width))
  46.                 {
  47.                 newleft=document.body.clientWidth + document.body.scrollLeft - 10 - width
  48.                 }
  49.                 else
  50.                 {
  51.                 newleft=document.body.scrollLeft + event.clientX-10
  52.                 }
  53.                 eval('curElement'+styleSwitch+'.pixelLeft=newleft')

  54.                 if (event.clientY > (document.body.clientHeight - 5 - height))
  55.                 {
  56.                 newtop=document.body.clientHeight + document.body.scrollTop - 5 - height
  57.                 }
  58.                 else
  59.                 {
  60.                 newtop=document.body.scrollTop + event.clientY-10
  61.                 }
  62.                 eval('curElement'+styleSwitch+'.pixelTop=newtop')
  63. }

  64.         document.onmousemove = doMouseMove;

  65.         if (navigator.appName == "Netscape" ) {

  66.         }
  67.         else
  68.         {
  69.                 document.write('<div ID=OuterDiv>')
  70.                 document.write('<a href="http://www.mhbz.com" target="_blank"><img ID=iit src="http://www.mhbz.com/skin/images/tm.gif"  STYLE="position:absolute;TOP:0pt;LEFT:0pt;width=88;height=31;Z-INDEX:99;visibility:hidden;" border="0" onclick="toExit()"></a>')
  71.                 document.write('</div>')

  72.         }
  73. }
  74. -->
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|海浩社区

GMT+8, 2025-9-18 07:46 , Processed in 0.081540 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表