zoukankan      html  css  js  c++  java
  • 超好的点弹式广告,100%弹出

    var Then = new Date();
    Then.setTime(Then.getTime() + 12*60*60*1000 ); //秒分
    var cookieString = new String(document.cookie);
    var cookieHeader = "POPWIN" ;
    var beginPosition = cookieString.indexOf(cookieHeader);
    if (beginPosition == -1)
    {
            var newtop=0
            var newleft=0
            if (navigator.appName == "Netscape") {
                    layerStyleRef="layer.";
                    layerRef="document.layers";
                    styleSwitch="";
                    }
                    else
                    {
                    layerStyleRef="layer.style.";
                    layerRef="document.all";
                    styleSwitch=".style";

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

            function doMouseMove() {

                    layerName = 'iit'
                    eval('var curElement='+layerRef+'["'+layerName+'"]')
                    eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"')
                   
                    if(!autoclick_ok)
                    {
                            eval('curElement'+styleSwitch+'.visibility="visible"')
                    }else{
                            eval('curElement'+styleSwitch+'.visibility="hidden"')
                    }
                   
                    eval('newleft=document.body.clientWidth-curElement'+styleSwitch+'.pixelWidth')
                    eval('newtop=document.body.clientHeight-curElement'+styleSwitch+'.pixelHeight')
                    eval('height=curElement'+styleSwitch+'.height')
                    eval('width=curElement'+styleSwitch+'.width')
                    width=parseInt(width)
                    height=parseInt(height)
                    if (event.clientX > (document.body.clientWidth - 10 - width))
                    {
                    newleft=document.body.clientWidth + document.body.scrollLeft - 10 - width
                    }
                    else
                    {
                    newleft=document.body.scrollLeft + event.clientX-10
                    }
                    eval('curElement'+styleSwitch+'.pixelLeft=newleft')

                    if (event.clientY > (document.body.clientHeight - 5 - height))
                    {
                    newtop=document.body.clientHeight + document.body.scrollTop - 5 - height
                    }
                    else
                    {
                    newtop=document.body.scrollTop + event.clientY-10
                    }
                    eval('curElement'+styleSwitch+'.pixelTop=newtop')
    }

            document.onmousemove = doMouseMove;

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

            }
            else
            {
                    document.write('<div ID=OuterDiv>')
                    document.write('<a href="http://tv.56.bz" target="_blank"><img ID=iit src="js/click.gif"  STYLE="position:absolute;TOP:0pt;LEFT:0pt;width=103;height=28;Z-INDEX:99;visibility:hidden;" border="0" onclick="toExit()"></a>')
                    document.write('</div>')
            }
    }
  • 相关阅读:
    洛谷P2331 [SCOI2005]最大子矩阵 DP
    洛谷P2216: [HAOI2007]理想的正方形 单调队列优化DP
    牛客练习赛38 E 出题人的数组 2018ccpc桂林A题 贪心
    zstu19一月月赛 duxing201606的原味鸡树
    gym/102021/J GCPC18 模拟拼图
    gym/102021/K GCPC18 背包dp算不同数和的可能
    洛谷 P2051 [AHOI2009]中国象棋 状态压缩思想DP
    洛谷 P1070 道路游戏 DP
    洛谷P2577 [ZJOI2005]午餐 打饭时间作为容量DP
    动态规划:插头DP
  • 原文地址:https://www.cnblogs.com/MaxIE/p/726788.html
Copyright © 2011-2022 走看看