+ -
当前位置:首页 → 问答吧 → 找高手看看这段代码是什么意思

找高手看看这段代码是什么意思

时间:2010-12-23

来源:互联网

下面代码是js代码,请高手看看是什么意思?
这段代码看到在好多站上被调用,一直看不明白是什么意思……


var imgwidth=700;
function $(id){return document.getElementById(id);}
function show(o){document.getElementById(o).style.display="block";}
function hide(o){document.getElementById(o).style.display="none";}
function geturl(url,id){
var http=false;
$(id).innerHTML='<span class="loading">  </span>';
if(window.XMLHttpRequest){http=new XMLHttpRequest();if(http.overrideMimeType){http.overrideMimeType('text/plain');}}else if(window.ActiveXObject){try{http=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}
if(!http){alert('Cannot send an XMLHTTP request');return false;}
http.onreadystatechange=function(){if(http.readyState==4){$(id).innerHTML=http.responseText;}}
http.open("get", url, true);
http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
http.send(null);
}
function imgsize(){
        var img=document.getElementById("content").getElementsByTagName("img");
        for(var i=0; i<img.length;i++){
                if(img.width>imgwidth){img.width=imgwidth;img.style.width=imgwidth;img.title="View";img.style.cursor="pointer";img.border=0;img.onclick=function(e){window.open(this.src);}}
        }
}

作者: heikezq   发布时间: 2010-12-23

路过  我也想知道什么意思。。。

作者: 悠悠敏心   发布时间: 2010-12-23

我也想知道什么意思

作者: tao917   发布时间: 2010-12-23

盼 高手来帮助下吧。

作者: maxdf   发布时间: 2010-12-23

只有等高手了

作者: linkou   发布时间: 2010-12-23