1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

新浪网站两侧的FLASH广告代码

本帖由 laogui2006-02-14 发布。版面名称:前端开发

  1. laogui

    laogui Administrator
    管理成员

    注册:
    2005-08-30
    帖子:
    15,216
    赞:
    35
    HTML:
    <html>
    <Script language="JavaScript">
    var rightbar;
    var coupletcode;
    rightbar = window.screen.width-138; //左边的广告条0距离靠近滚动条;138=2(浏览器边宽)+117(广告宽度)+17(滚动条宽度)+2(浏览器边宽)
    
    coupletcode = "<DIV id=sidebar style='LEFT: 0px; POSITION: absolute; TOP: 100px; VISIBILITY: hidden;' width=117>32</div><DIV id=sidebar2 style='LEFT: " + rightbar + "px; POSITION: absolute; TOP: 100px; VISIBILITY: hidden' width=117>32</div>";
    
    if (window.screen.width>=1024)
    {
    document.write(coupletcode);
    }
    
    function InsertCouplet()
    {
    if (window.screen.width>=1024){
    document.all.sidebar.style.visibility = "visible";
    document.all.sidebar2.style.visibility = "visible";
    document.all.sidebar.innerHTML = "<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 WIDTH=117 HEIGHT=270 id=leftFF ALIGN=> <PARAM NAME=movie VALUE=http://images.sohu.com/cs/button/youpai/120270812b.swf?clickthru=http://goto.sohu.com/goto.php3?code=youpai-sh47-frduilian> <PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent> <EMBED id=leftFFG src=http://images.sohu.com/cs/button/youpai/120270812b.swf?clickthru=http://goto.sohu.com/goto.php3?code=youpai-sh47-frduilian quality=high wmode=transparent WIDTH=117 HEIGHT=270 NAME=you ALIGN= TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer></EMBED></OBJECT>";
    document.all.sidebar2.innerHTML = "<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 WIDTH=117 HEIGHT=270 id=youFF ALIGN=> <PARAM NAME=movie VALUE=http://images.sohu.com/cs/button/youpai/120270812b.swf?clickthru=http://goto.sohu.com/goto.php3?code=youpai-sh47-frduilian> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode VALUE=transparent><EMBED id=youFFG src=http://images.sohu.com/cs/button/youpai/120270812b.swf?clickthru=http://goto.sohu.com/goto.php3?code=youpai-sh47-frduilian quality=high wmode=transparent WIDTH=117 HEIGHT=270 NAME=you ALIGN= TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer></EMBED></OBJECT>";
    
    }
    }
    
    InsertCouplet();
    function leftFFG_DoFSCommand(command,args){
    if ((command == "SohuCLFS")&&(args =="hidecouplet")){
    document.all.sidebar.style.visibility = "hidden";
    document.all.sidebar2.style.visibility = "hidden";
    }
    }
    function youFFG_DoFSCommand(command,args){
    leftFFG_DoFSCommand(command,args);
    }
    <!--
    if (document.all){
    document.write("<Script language=\"JavaScript\" For=\"youFF\" Event=\"FSCommand(command,args)\">\n");
    document.write(" leftFFG_DoFSCommand(command,args);\n");
    document.write("</Script>\n");
    document.write("<Script language=\"JavaScript\" For=\"leftFF\" Event=\"FSCommand(command,args)\">\n");
    document.write(" leftFFG_DoFSCommand(command,args);\n");
    document.write("</Script>\n");
    }
    //-->
    </script>
    
    </html>