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

在蓝色理想捡到的一个据说是不会屏敝的浮动图片代码。

本帖由 风狼 于 2006-06-13 发布。版面名称:前端开发

  1. 风狼

    风狼 New Member

    注册:
    2005-10-01
    帖子:
    7,452
    赞:
    25
    放这里藏下

    PHP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <
    title>aa</title>
    <
    SCRIPT language=javascript>

    if(
    typeof(LiveReceptionCode_ToRight) == 'undefined')
        var 
    LiveReceptionCode_ToRight = 1;
    if(
    typeof(LiveReceptionCode_ToBottom) == 'undefined')
        var 
    LiveReceptionCode_ToBottom = 0;
    if(
    typeof(LiveReceptionCode_helpimgleft) == 'undefined')
        var 
    LiveReceptionCode_helpimgleft = 0;
    if(
    typeof(LiveReceptionCode_helpimgtop) == 'undefined')
        var 
    LiveReceptionCode_helpimgtop = 150;
    if(
    typeof(LiveReception_regetCookie) != 'function'){
        
        function 
    LiveReception_regetCookie() {
            var 
    cval=null;
            var 
    name='LiveWSLRW69557093';
            var 
    arr = document.cookie.match(new RegExp('(^| )'+name+'=([^;]*)(;|$)'));
            if(
    arr != null) cval=unescape(arr[2]);
            if(
    cval==null) {
                var 
    path=';path=/;';
                var 
    expire = new Date((new Date()).getTime() + 315360000000).toGMTString();
                
    expire = '; expires=' + expire;
                var 
    value='6328054654139512506283';
                
    document.cookie = name + '=' + escape(value) + expire+path;
                
    arr = document.cookie.match(new RegExp('(^| )'+name+'=([^;]*)(;|$)'));
                if(
    arr != null) cval=unescape(arr[2]);
            }
            if(
    cval != null) {
                return 
    cval;
            }
            return 
    value; 
        } 
    }


    if(
    typeof(LiveReception_regetnewCookie) != 'function'){
        function 
    LiveReception_regetnewCookie() {
            var 
    cval=null;
            var 
    name='LiveWSLRW69557093sessionid';
            var 
    arr = document.cookie.match(new RegExp('(^| )'+name+'=([^;]*)(;|$)'));
            if(
    arr != null){
                return 
    unescape(arr[2]);
            }
            if(
    cval==null) {
                var 
    path=';path=/;';
                var 
    expire = new Date((new Date()).getTime() + 86400000).toGMTString();
                
    expire = '; expires=' + expire;
                var 
    value='6328054654139512506283';
                
    document.cookie = name + '=' + escape(value) + expire+path;
                
    arr = document.cookie.match(new RegExp('(^| )'+name+'=([^;]*)(;|$)'));
                if(
    arr != null){
                    
    cval=unescape(arr[2]);
                }
            }
            if(
    cval != null) {
                return 
    cval;
            }
            return 
    value; } 
    }

    if(
    typeof(LiveReceptionCode_ShowImage) == 'undefined'){
        var 
    LiveReceptionCode_NS = (document.layers) ? true : false;
        var 
    LiveReceptionCode_IE = (document.all) ? true : false;
        var 
    LiveReceptionCode_DOM = (document.getElementById) ? true : false;
        if (
    LiveReceptionCode_IE)LiveReceptionCode_DOM = false;
        var 
    LiveReceptionCode_MAC = (navigator.platform) && (navigator.platform.toUpperCase().indexOf('MAC') >= 0);
        if (
    LiveReceptionCode_NS)LiveReceptionCode_MAC = false;
        function 
    LiveReceptionCode_WriteDoc(str) {
            
    document.writeln(str);
        }
        function 
    LiveReceptionCode_GetObj(id) {
            if (
    document.getElementById) return document.getElementById(id);
            else if (
    document.all)return document.all(id);
        }
        var 
    LiveReceptionCode_chatopenurl='http://wt.zoosnet.net/';
        
    LiveReceptionCode_chatopenurl+='LR/ChatWin.aspx';
        
    LiveReceptionCode_chatopenurl+='?id=LRW69557093' +'&k='+LiveReception_regetCookie() +'&lng=cn' +'&imgint=' +'&nk='+LiveReception_regetnewCookie() +'&p='+escape(location.href) +'&r='+escape(escape(document.referrer));
        if (
    typeof(openZoosUrl) != 'function') {
            function 
    openZoosUrl(url) {
                var 
    LiveReceptionCode_chatwinname='LiveReceptionChatWinLRW69557093';
                var 
    iWidth=530;
                var 
    iHeight=400;
                var 
    iTop  = (screen.height - iHeight) / 4 ;
                var 
    iLeft = (screen.width  - iWidth) / 4 ;
                var 
    sOptions = 'toolbar=no';
                
    sOptions += ',width=' + iWidth ;
                
    sOptions += ',height=' + iHeight ;
                
    sOptions += ',resizable='  + 'yes' ;
                
    sOptions += ',scrollbars=' + 'no';
                
    sOptions += ',left=' + iLeft ;
                
    sOptions += ',top=' + iTop ;
                try {
                    var 
    oWindow = window.open(url,LiveReceptionCode_chatwinname, sOptions);
                    if(
    oWindow==null) { window.location=url;
                        return;
                    }
                    
    oWindow.focus();
                } catch(
    e){
                    
    window.location=url;
                }
            }
        }
        if (
    typeof(openZoosWindow) != 'function') {
            function 
    openZoosWindow(chatexplain) {
                
    openZoosUrl(LiveReceptionCode_chatopenurl+'&e='+escape(chatexplain));
            }
        }

        function 
    LiveReceptionCode_BuildChatWin(_lrchatexplain,_lrhelpalt) {
            if(
    typeof(LiveReceptionCode_Ishref) != 'undefined') {
            if(
    LiveReceptionCode_Ishref) return ' href="'+LiveReceptionCode_chatopenurl+'&e='+escape(_lrchatexplain)+'"  title="'+unescape(_lrhelpalt)+'" target="LiveReceptionChatWinLRW69557093" '; 
            }
            return 
    ' href="#"  onclick="openZoosWindow(\''+_lrchatexplain+'\');return false;" title="'+unescape(_lrhelpalt)+'" target="_self" '; 
        }

        
    setTimeout('LiveReceptionCode_ImageTimer()', 100);
        if(
    typeof(LiveReceptionCode_ToRight) == 'undefined') var LiveReceptionCode_ToRight = 0;
        if(
    typeof(LiveReceptionCode_ToBottom) == 'undefined') var LiveReceptionCode_ToBottom = 0;
        if(
    typeof(LiveReceptionCode_helpimgleft) == 'undefined') var LiveReceptionCode_helpimgleft = 0;
        if(
    typeof(LiveReceptionCode_helpimgtop) == 'undefined') var LiveReceptionCode_helpimgtop = 100;
        var 
    LiveReceptionCode_Left = -1;
        var 
    LiveReceptionCode_Top = -1;
        var 
    LiveReceptionCode_ImageFetched=true;
        var 
    LiveReceptionCode_ShowImage = true;
        var 
    LiveReceptionCode_help_innerHtml='';
        var 
    LiveReceptionCode_invite_innerHtml='';
        var 
    LiveReceptionCode_close_innerHtml='';
        
        
    //if(typeof(LiveReceptionCode_need_help_html) != 'undefined') LiveReceptionCode_help_innerHtml = LiveReceptionCode_need_help_html;
        
        
    if (LiveReceptionCode_IE || LiveReceptionCode_DOM) {
            
    LiveReceptionCode_WriteDoc('<span id="LiveReceptionCode_helplayer" style="z-index:8888;position:absolute;visibility:hidden;left:10px;top:10px;"></span>'); LiveReceptionCode_WriteDoc('<span id="LiveReceptionCode_closebtn"  style="Z-INDEX: 8889;position:absolute;visibility:hidden;left:10px;top:10px;width:11px"></span>');
        } else if (
    LiveReceptionCode_NS) {
            
    LiveReceptionCode_WriteDoc('<layer name="LiveReceptionCode_helplayer" z-index="8888" left="10px" top="10px" visibility="hidden"></layer>');
        }
        
        
    /*
        if(LiveReceptionCode_help_innerHtml=='' && LiveReceptionCode_GetObj('LiveReceptionCode_helplayer')!=null){
            LiveReceptionCode_help_innerHtml=LiveReceptionCode_GetObj('LiveReceptionCode_helplayer').innerHTML;
        }
        */
        
        
    function LiveReceptionCode_ClosePopup() {
            if (
    LiveReceptionCode_NS) {
                
    document.LiveReceptionCode_helplayer.visibility='hide';
            } else if (
    LiveReceptionCode_IE || LiveReceptionCode_DOM) {
                
    LiveReceptionCode_GetObj('LiveReceptionCode_helplayer').style.visibility ='hidden';
                
    LiveReceptionCode_GetObj('LiveReceptionCode_closebtn').style.visibility ='hidden';
            }
            
            
    LiveReceptionCode_ShowImage=false;
        }
        
        function 
    LiveReceptionCode_ImageTimer() {
            if(
    LiveReceptionCode_GetObj('LiveReceptionCode_helplayer')==null){
                
    setTimeout('LiveReceptionCode_ImageTimer()', 100);
                return;
            }
            
            if (
    LiveReceptionCode_ShowImage && LiveReceptionCode_ImageFetched) {
                var 
    top;
                var 
    left;
                
                if(
    LiveReceptionCode_GetObj('LiveReceptionCode_helplayer').innerHTML.indexOf(' href=')==-1) {
                    
    LiveReceptionCode_GetObj('LiveReceptionCode_closebtn').innerHTML=LiveReceptionCode_close_innerHtml;
                    
                    if(
    LiveReceptionCode_invite_innerHtml != ''){
                        
    LiveReceptionCode_GetObj('LiveReceptionCode_helplayer').innerHTML = LiveReceptionCode_invite_innerHtml;
                    }else{
                        
    LiveReceptionCode_GetObj('LiveReceptionCode_helplayer').innerHTML = LiveReceptionCode_help_innerHtml;
                    }
                }
                
                if (
    LiveReceptionCode_IE) {
                    
                    if(
    document.documentElement&&document.documentElement.scrollTop){
                        
    scrollPosY=document.documentElement.scrollTop
                    
    } else if(document.body){
                        
    scrollPosY=document.body.scrollTop;
                    }
                    
                    if(
    document.documentElement&&document.documentElement.scrollLeft){
                        
    scrollPosX=document.documentElement.scrollLeft;
                    }else if(
    document.body){
                        
    scrollPosX=document.body.scrollLeft;
                    }
                    
                    
    top = scrollPosY;
                    
    left = scrollPosX;
                    
                    if ((
    LiveReceptionCode_Top < 0) || ((LiveReceptionCode_Top == top) && (LiveReceptionCode_Left == left))) {
                        
    document.all.LiveReceptionCode_helplayer.style.visibility = 'visible';
                        if(
    LiveReceptionCode_GetObj('LiveReceptionCode_need_help')!=null){
                            
    document.all.LiveReceptionCode_closebtn.style.visibility = 'visible';
                        } else {
                            
    document.all.LiveReceptionCode_closebtn.style.visibility = 'hidden';
                        }
                    } else {
                        
    document.all.LiveReceptionCode_helplayer.style.visibility = 'hidden';
                        
    document.all.LiveReceptionCode_closebtn.style.visibility = 'hidden';
                    }
                     
                } else if (
    LiveReceptionCode_NS) {
                    
                    
    top = pageYOffset; left = pageXOffset;
                    
                    if ((
    LiveReceptionCode_Top < 0) || ((LiveReceptionCode_Top == top) && (LiveReceptionCode_Left == left))) {
                        
    document.layers.LiveReceptionCode_helplayer.visibility = 'visible';
                    } else {
                        
    document.layers.LiveReceptionCode_helplayer.visibility = 'hidden';
                    }
                     
                } else if (
    LiveReceptionCode_DOM){
                    
    top = pageYOffset;
                    
    left = pageXOffset;
                    if ((
    LiveReceptionCode_Top < 0) || ((LiveReceptionCode_Top == top) && (LiveReceptionCode_Left == left))) {
                        
                        
    LiveReceptionCode_GetObj('LiveReceptionCode_helplayer').style.visibility = 'visible';
                        
                        if(
    LiveReceptionCode_GetObj('LiveReceptionCode_need_help')!=null){
                            
    LiveReceptionCode_GetObj('LiveReceptionCode_closebtn').style.visibility = 'visible';
                        } else {
                            
    LiveReceptionCode_GetObj('LiveReceptionCode_closebtn').style.visibility = 'hidden';
                        }
                    } else {
                        
    LiveReceptionCode_GetObj('LiveReceptionCode_helplayer').style.visibility = 'hidden';
                        
    LiveReceptionCode_GetObj('LiveReceptionCode_closebtn').style.visibility = 'hidden';
                    }
                }
                
                
    LiveReceptionCode_hcPlaceImage();
                
    LiveReceptionCode_Top = top;
                
    LiveReceptionCode_Left = left;
                
            }
            
            
    setTimeout('LiveReceptionCode_ImageTimer()', 100);
        }
        
        function 
    LiveReceptionCode_hcPlaceImage() {
            var 
    y;
            var 
    x;
            var 
    floatwidth=0;
            if(
    LiveReceptionCode_GetObj('LiveReceptionCode_need_help')!=null)floatwidth=LiveReceptionCode_GetObj('LiveReceptionCode_need_help').width;
            var 
    floatheigth=0;
            if(
    LiveReceptionCode_GetObj('LiveReceptionCode_need_help')!=null)floatheigth=LiveReceptionCode_GetObj('LiveReceptionCode_need_help').style.height;
            if(
    document.documentElement&&document.documentElement.clientWidth){
                
    x=document.documentElement.clientWidth;
                if(
    document.body){
                    
    x=Math.min(x,document.body.clientWidth);
                }
            }else if(
    document.body){
                
    x=document.body.clientWidth;
            }
            if(
    document.documentElement&&document.documentElement.clientHeight){
                
    y=document.documentElement.clientHeight;
                if(
    document.body){
                    
    y=Math.min(y,document.body.clientHeight);
                }
            }else if(
    document.body){
                
    y=document.body.clientHeight;
            }
            if(
    LiveReceptionCode_ToBottom) {
                if(
    document.body){
                    
    y = y-floatheigth-LiveReceptionCode_helpimgtop;
                } else {
                    
    y = innerHeight-floatheigth-LiveReceptionCode_helpimgtop;
                }
            } else{
                if(
    LiveReceptionCode_invite_innerHtml==''){
                    
    y= LiveReceptionCode_helpimgtop;
                }else{
                    if(
    document.body){
                        
    y = (y-200)/2;
                    } else {
                        
    y = (innerHeight-200)/2;
                    }
                }
                if(
    y<0) y=20;
            }
            if(
    LiveReceptionCode_ToRight) {
                if(
    document.body) {
                    
    x = x-floatwidth-LiveReceptionCode_helpimgleft;
                } else {
                    
    x = innerWidth-floatwidth-LiveReceptionCode_helpimgleft;
                }
            } else {
                if(
    LiveReceptionCode_invite_innerHtml==''){
                    
    x = LiveReceptionCode_helpimgleft;
                } else {
                    if(
    document.body){
                        
    x = (x-450)/2;
                    } else {
                        
    x = (innerWidth-450)/2;
                    }
                }
            } 
            if (
    typeof(lpPosX) != 'undefined') x = lpPosX;
            if (
    typeof(lpPosY) != 'undefined') y = lpPosY;
            var 
    obj = null;
            var 
    obj1 = null;
            if (
    LiveReceptionCode_IE) {
                
    obj = document.all.LiveReceptionCode_helplayer.style;
                
    obj1 = document.all.LiveReceptionCode_closebtn.style;
            } else if (
    LiveReceptionCode_NS) {
                
    obj = document.layers.LiveReceptionCode_helplayer;
            } else if (
    LiveReceptionCode_DOM) {
                
    obj = LiveReceptionCode_GetObj('LiveReceptionCode_helplayer').style;
                
    obj1 = LiveReceptionCode_GetObj('LiveReceptionCode_closebtn').style;
            }
            
            if (
    typeof(lpPlacementFunctionHook) == 'function') {
                
    lpPlacementFunctionHook(obj);
            } else {
                if (
    LiveReceptionCode_IE) {
                    if(
    document.documentElement&&document.documentElement.scrollTop){
                        
    scrollPosY=document.documentElement.scrollTop;
                    } else if(
    document.body){
                        
    scrollPosY=document.body.scrollTop;
                    }
                    
                    if(
    document.documentElement&&document.documentElement.scrollLeft){
                        
    scrollPosX=document.documentElement.scrollLeft;
                    }else if(
    document.body){
                        
    scrollPosX=document.body.scrollLeft;
                    }
                    
                    
    obj.left = scrollPosX + x + 'px';
                    
    obj1.left = scrollPosX + x +floatwidth-11+ 'px';
                    
    obj.top= obj1.top = scrollPosY + y + 'px';
                } else if (
    LiveReceptionCode_NS) {
                        
    obj.left = pageXOffset + x;
                        
    obj.top = pageYOffset + y;
                } else if (
    LiveReceptionCode_DOM) {
                        
    obj.left =  pageXOffset + x + 'px';
                        
    obj1.left = pageXOffset + x +floatwidth-11 + 'px';
                        
    obj.top = obj1.top = pageYOffset + y + 'px';
                }
            } 
        } 
    }

    var 
    LiveReceptionCode_isonline=1;

    if(
    LiveReceptionCode_isonline && typeof(LiveReceptionCode_helpalt_online) != 'undefined') {
        var 
    LiveReceptionCode_helpalt=LiveReceptionCode_helpalt_online;
    } else if(!
    LiveReceptionCode_isonline && typeof(LiveReceptionCode_helpalt_offline) != 'undefined') {
        var 
    LiveReceptionCode_helpalt=LiveReceptionCode_helpalt_offline;
    } else {
        var 
    LiveReceptionCode_helpalt='%u5982%u679c%u60a8%u6709%u4ec0%u4e48%u95ee%u9898%2c%u8bf7%u70b9%u51fb%u6b64%u5904%u8fdb%u884c%u5373%u65f6%u6c9f%u901a%3b';
    }

    LiveReceptionCode_helpalt=LiveReceptionCode_helpalt.replace(/\+/g,'%20');
    LiveReceptionCode_helpalt=unescape(LiveReceptionCode_helpalt);

    if(
    LiveReceptionCode_isonline && typeof(LiveReceptionCode_chatexplain_online) != 'undefined') {
        var 
    LiveReceptionCode_chatexplain=LiveReceptionCode_chatexplain_online;
    } else if(!
    LiveReceptionCode_isonline && typeof(LiveReceptionCode_chatexplain_offline) != 'undefined') {
        var 
    LiveReceptionCode_chatexplain=LiveReceptionCode_chatexplain_offline;
    } else {
        var 
    LiveReceptionCode_chatexplain='%u5982%u679c%u60a8%u6709%u4ec0%u4e48%u95ee%u9898%2c%u8bf7%u70b9%u51fb%u6b64%u5904%u8fdb%u884c%u5373%u65f6%u6c9f%u901a%3b';
    }

    LiveReceptionCode_chatexplain=LiveReceptionCode_chatexplain.replace(/\+/g,'%20');

    function 
    LiveReceptionCode_SetImage(name, image) {
        
    LiveReceptionCode_FindImage(document,name).src = image;
    }

    function 
    LiveReceptionCode_FindImage(doc, name) {
        if (
    LiveReceptionCode_DOM) return doc.getElementsByTagName('IMG')[name];
        var 
    lays = doc.layers;
        if (! 
    lays) return doc[name];
        for (var 
    i = 0; i < doc.images.length; i++) {
            if (
    doc.images[i].name == name) return doc.images[i];
        }
        for (var 
    l = 0; l < lays.length; l++) {
            
    img = LiveReceptionCode_FindImage(lays[l].document, name);
            if (
    img != null) return img;
        }
        return 
    null;
    }

    if(
    LiveReceptionCode_isonline && typeof(LiveReceptionCode_helpimgsrc_online) != 'undefined') {
        var 
    LiveReceptionCode_helpimgsrc=LiveReceptionCode_helpimgsrc_online;
    } else if(!
    LiveReceptionCode_isonline && typeof(LiveReceptionCode_helpimgsrc_offline) != 'undefined'){
        var 
    LiveReceptionCode_helpimgsrc=LiveReceptionCode_helpimgsrc_offline;
    } else {
        var 
    LiveReceptionCode_helpimgsrc='http://www.blueidea.com/img/common/logo.gif';
    }

    var 
    LiveReceptionCode_closeimgonsrc='http://www.blueidea.com/articleimg/bbsimg/icon10.gif';
    var 
    LiveReceptionCode_closeimgoffsrc='http://www.blueidea.com/articleimg/bbsimg/icon9.gif';
    var 
    LiveReceptionCode_closealt=unescape('%u5173%u95ed');

    <!-- 
    ICON CODE -->
    LiveReceptionCode_help_innerHtml='<a href="#"><img  id="LiveReceptionCode_need_help" name="LiveReceptionCode_need_help"  alt=""  border="0" src="'+LiveReceptionCode_helpimgsrc+'"></a>';

    <!-- 
    Close Button CODE -->
    LiveReceptionCode_close_innerHtml='<a href="#" onclick="" title=""  target="_self"><img alt='+LiveReceptionCode_closealt+'  name="LiveReceptionCode_need_close" border="0" onmouseover="LiveReceptionCode_SetImage(\'LiveReceptionCode_need_close\',LiveReceptionCode_closeimgonsrc)" onmouseout="LiveReceptionCode_SetImage(\'LiveReceptionCode_need_close\',LiveReceptionCode_closeimgoffsrc)" src="'+LiveReceptionCode_closeimgoffsrc+'"></a>'; 

    </
    SCRIPT>

    </
    head>

    <
    body>
    <
    br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    </
    body>

    </
    html>

     
  2. zouql

    zouql New Member

    注册:
    2005-11-27
    帖子:
    312
    赞:
    4
    操,真够长的。
     
  3. zouql

    zouql New Member

    注册:
    2005-11-27
    帖子:
    312
    赞:
    4
    快比我首页长了:sweat:
     
  4. 泡菜

    泡菜 New Member

    注册:
    2006-04-08
    帖子:
    575
    赞:
    6
    试试去。 :p