⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userhead.js.php

📁 最强的爬虫工程
💻 PHP
📖 第 1 页 / 共 5 页
字号:
//
//#############################//
var userLogin={isCard:false,isFFbutton:false,isNull:function(obj){return(obj==""||obj==null||obj=="undefined");},loadJs:function(type,id){var Path="http://control.video.sina.com.cn/app/login/jsLogin.php?";if(type=='checkpass'){var userid=document.getElementById('_userLogin_name').value;var pass=document.getElementById('_userLogin_pass').value;var code=document.getElementById('_userLogin_codenum').value;Path+='userid='+userid+'&password='+pass+'&code='+code+'&job=checkpass&id='+id;}if(type=='checknum'){Path+='job=checknum';}if(type=='updatehead'){Path="http://control.video.sina.com.cn/useradmin/header.php?q=1";}Path+='&_='+Math.random();var head=document.getElementsByTagName("head")[0];var js=document.createElement("script");js.src=Path;js.onload=js.onreadystatechange=function(){if(!this.readyState||this.readyState=="loaded"||this.readyState=="complete"){head.removeChild(js);}}head.appendChild(js);return true;},isLogin:function(){return!this.isNull(new RegExp("(^|)SINAPRO=([^;]*)(;|$)","gi").exec(document.cookie));},toEvent:function(id,event){this.loginHide();var obj=document.getElementById(id);if(this.isNull(obj)){var cardIframe=document.frames?top.document.frames['friendDialogIframe']:top.document.getElementById('friendDialogIframe').contentWindow;obj=cardIframe.document.getElementById(id);}if(document.all){obj.click();}else{if(this.isNull(obj.getAttribute('isFriendDialog'))){evt=document.createEvent("MouseEvents");evt.initMouseEvent('click',true,false,obj.ownerDocument.defaultView,1,0,0,0,0,false,false,false,false,0,null);obj.dispatchEvent(evt);}else{if(this.isCard){var cardIframe=top.document.getElementById('friendDialogIframe');var thisPos=this.getPos(cardIframe);}else{var thisPos=this.getPos(obj);}var myEvent={target:obj,pageX:thisPos.left,pageY:thisPos.top,clientX:thisPos.left,clientY:thisPos.top};commonDialog.openWin(obj,myEvent);}}return true;},getXY:function(){var x,y;if(window.innerHeight&&window.scrollMaxY){x=window.innerWidth+window.scrollMaxX-17;y=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){x=document.body.scrollWidth;y=document.body.scrollHeight;}else{x=document.body.offsetWidth;y=document.body.offsetHeight;}return{X:x,Y:y};},showBg:function(type,id){var Div=document.getElementById('_userLoginBgDiv');if(type=='show'){var XY=this.getXY();var css="position:absolute;display:block;top:0px;left:0px;height:"+XY.Y+"px;width:"+XY.X+"px;opacity:0.2;filter:alpha(opacity=20);background:#000;z-index:90009;";if(this.isNull(Div)){var Div=document.createElement("div");var Body=document.getElementsByTagName("body")[0];Div.id="_userLoginBgDiv";Div.style.cssText=css;Body.appendChild(Div);}else{Div.style.cssText=css;}Div.onclick=function(){userLogin.loginHide()}document.body.onresize=top.window.onresize=null;document.body.onresize=top.window.onresize=function(){try{var auto=top.document.getElementById('_userLoginBgDiv');if(auto!=null&&auto.style.display=='block'){userLogin.showBg('show',id);if(typeof id!='undefined'){userLogin.showLogin('show',id);}}}catch(e){return true;}}}else{try{Div.style.display='none'}catch(e){};}return true;},showLogin:function(type,id,event){var obj=document.getElementById('_userLoginDiv');var html='<div class="quicklogin"><div class="b_layer"><div class="tit"><div class="fleft">您处于未登录状态,请登录</div><div class="fright"><a href="###" onmousedown="userLogin.loginHide()" title="关闭"></a></div></div><div class="info"><span id="_userLogin_info" class="erro" style="display:none"></span><dl><dt>登录名:</dt><dd><input id="_userLogin_name" maxlength="20" type="text" class="frm" style="width:113px;" onkeydown="if(event.keyCode==13) userLogin.loadJs(\'checkpass\',\''+id+'\')" ></dd><dt>密&nbsp;&nbsp;码:</dt><dd><input id="_userLogin_pass" maxlength="20" type="password" class="frm" style="width:113px;" onkeydown="if(event.keyCode==13) userLogin.loadJs(\'checkpass\',\''+id+'\')" ></dd><dt id="_userLogin_codedt" style="display:none">验证码:</dt><dd id="_userLogin_codedd" style="display:none"><input  id="_userLogin_codenum" maxlength="4" type="text" class="frm" style="width:57px;" onkeydown="if(event.keyCode==13) userLogin.loadJs(\'checkpass\',\''+id+'\')"> <img id="_userLogin_codeimg"  src=""  height="20" border="0" align="absmiddle"></dd><dt>&nbsp;</dt><dd><input type="image" src="http://image2.sina.com.cn/vblog/images/v_index_login/vlog_btn_ok.gif" onclick="userLogin.loadJs(\'checkpass\',\''+id+'\')"/></dd></dl><div class="clearboth"><div></div><div class="bom blue_line"><a href="http://unipro.sina.com.cn/getpass.html" onclick="userLogin.loginHide();return true;" target="_blank">忘记密码</a><span>|</span><a href="http://control.video.sina.com.cn/app/register/" onclick="userLogin.loginHide();return true;" target="_blank">尚未注册</a></div></div><div class="clearboth"></div></div>';if(type=='show'){var thisHeight=158;var thisWidth=260;var XY=this.getXY();if(!this.isCard){var thisId=document.getElementById(id);var thisPos=this.getPos(thisId);var thisTop=Math.floor(thisPos.top-(thisHeight-thisId.offsetHeight)/2);var thisLeft=Math.floor(thisPos.left-(thisWidth-thisId.offsetWidth)/2);var cutWidth=XY.X-(thisLeft+thisWidth);}else{var cardIframe=top.document.getElementById('friendDialogIframe');var thisPos=this.getPos(cardIframe);var thisTop=thisPos.top+2;var thisLeft=thisPos.left+2;var cutWidth=XY.X-(thisLeft+thisWidth);}thisTop=thisTop<=0?1:thisTop;thisLeft=cutWidth>=0?thisLeft:thisLeft+cutWidth-10;thisLeft=thisLeft<=20?20:thisLeft;var css="position:absolute;display:block;top:"+thisTop+"px;left:"+thisLeft+"px;height:auto;width:"+thisWidth+"px;z-index:90010;";if(this.isNull(obj)){var Div=document.createElement("div");var Body=document.getElementsByTagName("body")[0];Div.id="_userLoginDiv";Div.style.cssText=css;Body.appendChild(Div);Div.innerHTML=html;this.loadJs('checknum');}else{obj.style.cssText=css;obj.innerHTML=html;this.loadJs('checknum');}try{document.getElementById('_userLogin_name').focus()}catch(e){}}else{try{obj.style.display='none'}catch(e){};}},loginHide:function(){this.showBg('hide');this.showLogin('hide');},getPos:function(obj){var x=y=w=h=0;if(obj.getBoundingClientRect){var box=obj.getBoundingClientRect();y=box.top+Math.max(document.documentElement.scrollTop,document.body.scrollTop)-2;x=box.left+Math.max(document.documentElement.scrollLeft,document.body.scrollLeft)-2;w=h=2;}else{for(;obj!=document.body;x+=obj.offsetLeft,y+=obj.offsetTop,obj=obj.offsetParent);w=h=2;if(this.isFFbutton){y-=12;h=12;}}return{'left':x,'top':y,'w':w,'h':h};},showClickDiv:function(id,useLink){obj=document.getElementById(id);var isCursor="cursor:pointer";var Div=document.getElementById('_userLoginClickDiv');var pos=this.getPos(obj);if(this.isNull(Div)){var Div=document.createElement("div");var Body=document.getElementsByTagName("body")[0];Div.id="_userLoginClickDiv";Div.style.cssText="position:absolute;display:block;"+isCursor+";top:"+pos.top+"px;left:"+pos.left+"px;height:"+(obj.offsetHeight+pos.h)+"px;width:"+(obj.offsetWidth+pos.w)+"px;background:#eee;z-index:90011;opacity:0.1;filter:alpha(opacity=10);";Body.appendChild(Div);}else{Div.style.cssText="position:absolute;display:block;"+isCursor+";top:"+pos.top+"px;left:"+pos.left+"px;height:"+(obj.offsetHeight+pos.h)+"px;width:"+(obj.offsetWidth+pos.w)+"px;background:#eee;z-index:90011;opacity:0.1;filter:alpha(opacity=10);";}Div.onmouseout=function(){if(useLink)obj.style.color="#001A9F";this.style.display='none'}Div.onclick=function(){this.style.display='none'userLogin.showBg('show',id);userLogin.showLogin('show',id);}},checkLogin:function(id,notLink,FF){var useLink=(typeof notLink=="undefined");this.isFFbutton=!(typeof FF=="undefined");if(id=="card_showInvite"||id=="card_sendMsg"){this.isCard=true;userLogin.showBg('show',id);userLogin.showLogin('show',id);return false;}else{this.isCard=false;if(this.isLogin()){return true;}else{if(useLink)document.getElementById(id).style.color="#BD0302";this.showClickDiv(id,useLink);return false;}}}}//
//#############################//

if(typeof baseObject=="undefined"){window['baseObject']={htmlSpans:[],htmlLinks:[],htmlImages:[],htmlInput:[],isRequestIng:false,initBase:function(){var jsObj=this.$("loadJs");if(this.isNull(jsObj)){document.write('<script type="text/javascript" id="loadJs"></script>');}var iframeObj=this.$("loadIframe");if(this.isNull(iframeObj)){var strDisplay="";if(navigator.userAgent.toLowerCase().indexOf('msie')>=0){strDisplay="none";}var dialogStr='';dialogStr+='<div  style="display:'+strDisplay+'; height:0px;width:0px">';dialogStr+='<iframe name="loadIframe" id="loadIframe" height="0" width="0" style="display:'+strDisplay+'; width:0px; height:0px" ></iframe>';dialogStr+='<div id="loadDivForPost" style="display:none;"></div>';dialogStr+='</div>';if(typeof(hasInitPostIframe)=='undefined'){hasInitPostIframe=true;document.write(dialogStr);}}},_submitByPost:function(targetAddr){this.$('loadDivForPost').innerHTML="";var arrUrl=targetAddr.split(/\?/gi);var strAction=arrUrl[0];var strFormElement="";if(arrUrl.length>1&&!this.isNull(arrUrl[1])){var params=arrUrl[1];var arrparam=params.split(/&/gi);for(var i=0;i<arrparam.length;i++){var arrElement=arrparam[i].split(/=/gi);if(typeof(arrElement[1])=='undefined'||this.isNull(arrElement[1])){arrElement[1]="";}strFormElement+='<input type="hidden" name="'+arrElement[0]+'"  value="'+arrElement[1]+'" />';}}var regObj=new RegExp('\/\/[^\/]*\/','ig');var localDomain=document.location.href.match(regObj);localDomain=this.isNull(localDomain)?["you.video.sina.com.cn"]:localDomain;var regObj=new RegExp('\/','ig');localDomain=localDomain[0].replace(regObj,'');var strForm='<form  target="loadIframe" action="'+strAction+"?localDomain="+encodeURIComponent(localDomain)+"&golbalId="+this.getGlobalId()+'" name="loadForm" id="loadForm" method="post">';strForm+=strFormElement;strForm+='</form>';this.$('loadDivForPost').innerHTML=strForm;var objForm=this.$('loadForm');if(!this.isNull(objForm)){objForm.submit();}},requestJs:function(targetAddr,varName,callBack,timeout,timeoutCallBack,method){var me=this;method=this.isNull(method)?"get":method;method=method.toLowerCase();if(true==baseObject.isRequestIng){setTimeout(function(){me.requestJs(targetAddr,varName,callBack,timeout,timeoutCallBack,method);},100);}else{baseObject.isRequestIng=true;if('get'==method){eval(varName+"=null;");this.loadJs(targetAddr,"loadJs");}else{this._submitByPost(targetAddr);}if(!this.isNull(callBack)){this.readJsData(varName,callBack,timeout,timeoutCallBack,method);}}},readJsData:function(varName,callBack,timeout,timeoutCallBack,method){timeout=this.isNull(timeout)?"30000":timeout;if(timeout<=0){baseObject.isRequestIng=false;if(!this.isNull(timeoutCallBack)){timeoutCallBack();}else{alert('数据超时了,请稍后在试')};}else{var requestJsData=null;if('get'==method){eval("requestJsData="+varName+";");}else{try{var dataIframe=document.frames?document.frames['loadIframe']:document.getElementById('loadIframe').contentWindow;var regObj=new RegExp('\/\/[^\/]*\/','ig');var IframeUrl=dataIframe.document.location.href.match(regObj);IframeUrl=this.isNull(IframeUrl)?[""]:IframeUrl;var regObj=new RegExp('\/','ig');IframeUrl=IframeUrl[0].replace(regObj,'');var regObj=new RegExp('\/\/[^\/]*\/','ig');var localUrl=document.location.href.match(regObj);localUrl=this.isNull(localUrl)?[""]:localUrl;var regObj=new RegExp('\/','ig');localUrl=localUrl[0].replace(regObj,'');if(localUrl==IframeUrl){eval("requestJsData=dataIframe."+varName+";");}}catch(e){}}if(this.isNull(requestJsData)){var me=this;setTimeout(function(){me.readJsData(varName,callBack,timeout-100,timeoutCallBack,method);},100);}else{callBack(requestJsData);baseObject.isRequestIng=false;return void(0);}}},splitHtmlCssScript:function(htmlStr){var regCss=/(?:<style.*?>)((\n|\r|.)*?)(?:<\/style>)|(<link[^<>]*>[^<>]*<\/link>)|(<link[^<>]*>)/img;var regScript=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/img;var strJs=htmlStr.match(regScript);var strCss=htmlStr.match(regCss);var strHtml=htmlStr.replace(regScript,'').replace(regCss,'');return{html:strHtml,css:strCss,js:strJs};},getUserInfo:function(){var userInfo={};var viewUid=this.getCookie('VBLOG_USERID');viewUid=(typeof(viewUid)=='undefined'||this.isNull(viewUid))?"":viewUid;var userCookie=this.getCookie('VBLOG_JS_USER');userCookie=this.isNull(userCookie)?"":userCookie;var arrUserNick=userCookie.split("|");var userNick="新浪网友";var signName="";if(!this.isNull(arrUserNick)&&!this.isNull(viewUid)){if(typeof(arrUserNick[1])!="undefined"){userNick=arrUserNick[1];userNick=userNick.replace(/%2B/g,"|");userNick=decodeURIComponent(userNick).replace(/\+/img," ").replace(/\|/g,"+");}if(typeof(arrUserNick[2])!="undefined"){signName=arrUserNick[2];signName=signName.replace(/%2B/g,"|");signName=decodeURIComponent(arrUserNick[2]).replace(/\+/img," ").replace(/\|/g,"+");}}userInfo['uid']=viewUid;userInfo['nick']=userNick;userInfo['signName']=signName;return userInfo;},getCookie:function(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end));},getStrTagName:function(str){str=""+str;var tagName=str.match(/(<[^<\/>]*)|(<[^<\/>]*\/>)|(<[^<\/>]*>)/img);tagName=""+tagName;tagName=tagName.replace(/[<\/>]*/img,"");return tagName;},getStrDomAttribute:function(str){var regObj=new RegExp(' ','img');str=""+(""+str).replace(regObj,"  ");var arrObj={};try{var arrMachAttr=""+str;var eregStript=/(<[^<>]+\/>)|<[^<\/>]+>/ig;arrMachAttr=str.match(eregStript)[0].replace(/\/>/img," >");arrMachAttr=arrMachAttr.replace(/(<[^\/]*>)|(<[^>]*\/)|(<[^\/>]*)/ig,"").replace(/(>)|(\/>)/ig,"").replace(/*=*/ig,"=");var eregi=/[^<\/>]*=[^<>]*/img;arrMachAttr=arrMachAttr.match(eregi);if(!this.isNull(arrMachAttr)){for(var i=0;i<arrMachAttr.length;i++){var keyValueArr=(""+arrMachAttr[i]).split(/=/img);if(!this.isNull(keyValueArr[0])){arrObj[keyValueArr[0]]=keyValueArr[1];}}}}catch(e){arrObj={};}return arrObj;},stripTags:function(str){var returnStr=str.replace(/<\/?[^>]+>/gi,'');if(this.isNull(returnStr)){returnStr="";}return returnStr;},strToElement:function(str,objWin){str=""+str;if(this.isNull(objWin)){objWin=window;}var tagName=""+this.getStrTagName(str);var attrObj=this.getStrDomAttribute(str);var objEle=objWin.document?objWin.document.createElement(tagName):document.createElement(tagName);var strInnerHtml=this.stripTags(str);objEle.nodeValue=strInnerHtml;for(var indexName in attrObj){try{var key=indexName;var val=attrObj[indexName];if(!this.isNull(key)&&!this.isNull(val)){objEle.setAttribute(key,val);}}catch(e){}}return objEle;},appendHeadStr:function(str,objWin){if(this.isNull(objWin)){objWin=window;}try{var objEle=this.strToElement(str,objWin);this.appendHeaderElement(objEle,objWin);}catch(e){}},appendHeaderElement:function(objEle,objWin){if(this.isNull(objWin)){objWin=window;}try{objWin.document.getElementsByTagName("head")[0].appendChild(objEle);}catch(e){try{var firstNode=objWin.document.getElementsByTagName("body")[0].childNodes[0];firstNode.parentNode.insertBefore(objEle,firstNode);}catch(e){}}},appendScriptChild:function(_ID,_SRC){try{var objScript=document.getElementById(_ID);if(!this.isNull(objScript)){if(!this.isNull(_SRC)){objScript.src=_SRC;}}else{var s=document.createElement("SCRIPT");s.type="text/javascript";if(!this.isNull(_ID)){s.id=_ID;}if(!this.isNull(_SRC)){s.src=_SRC;}this.appendHeaderElement(s);s=null;}}catch(e){var srcAddr=this.isNull(_SRC)?"":'src="'+_SRC+'"';var idAttr=this.isNull(_ID)?"":'id="'+_ID+'"';document.write('<script type="text/javascript" '+idAttr+' '+srcAddr+'></script>');}},loadJs:function(jsUrl,_ID){_ID=this.isNull(_ID)?"loadJs":_ID;if(navigator.userAgent.toLowerCase().indexOf('msie')>=0){var jsObj=this.$(_ID);if(this.isNull(jsObj)){this.appendScriptChild(_ID,jsUrl);}else{jsObj.src=jsUrl;}}else{var js=document.createElement("script");js.setAttribute("type","text/javascript");js.setAttribute("src",jsUrl);document.body.insertBefore(js,null);}},getHtml:function(htmlObj){if(this.isNull(htmlObj)){htmlObj=document;}this.htmlSpans=htmlObj.getElementsByTagName("SPAN");this.htmlLinks=htmlObj.getElementsByTagName("A");this.htmlImages=htmlObj.getElementsByTagName("IMG");this.htmlInput=htmlObj.getElementsByTagName("INPUT");},getDim:function(htmlObj){var rd={x:0,y:0};do{rd.x+=htmlObj.offsetLeft;rd.y+=htmlObj.offsetTop;htmlObj=htmlObj.offsetParent;}while(htmlObj)return rd;},getPageSize:function(objWin){var xScroll,yScroll;objWin=this.isNull(objWin)?window:objWin;if(document.body&&document.body.scrollHeight>document.body.offsetHeight){xScroll=objWin.document.body.scrollWidth;yScroll=objWin.document.body.scrollHeight;}else if(document.documentElement){xScroll=objWin.document.documentElement.scrollWidth;yScroll=objWin.document.documentElement.scrollHeight;}var windowWidth,windowHeight;if(self.innerHeight){windowWidth=objWin.innerWidth;windowHeight=objWin.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=objWin.document.documentElement.clientWidth;windowHeight=objWin.document.documentElement.clientHeight;}else if(document.body){windowWidth=objWin.document.body.clientWidth;windowHeight=objWin.document.body.clientHeight;}if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}if(xScroll<windowWidth){pageWidth=windowWidth;}else{pageWidth=xScroll;}arrayPageSize={pw:pageWidth,ph:pageHeight,ww:windowWidth,wh:windowHeight,sw:xScroll,sh:yScroll};return arrayPageSize;},filterPage:function(page,totalpage){try{page=parseInt(page);}catch(e){page=1;}if(isNaN(page)||page<=0){page=1;}if(page>totalpage&&totalpage>0){page=totalpage;}return page;},isNull:function(object){return(object==""||object==null||object=="undefined");},addEvent:function(obj,EventName,callBack){obj["on"+EventName]=callBack;},pxParseInt:function(strPx){return parseInt((""+strPx).toLowerCase().replace(/px/g,""))},pointerX:function(event){try{return event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));}catch(e){return 0;}},pointerY:function(event){try{return event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop));}catch(e){return 0;}},$:function(idname){if(document.getElementById){return document.getElementById(idname);}else if(document.all){return document.all[idname];}else if(document.layers){return document.layers[idname];}else{return null;}},getUnicodeLen:function(sChars){return sChars.replace(/[^\x00-\xff]/g,"xx").length;},cutUnicodeStr:function(sSource,iLen,ELIDED){if(this.getUnicodeLen(sSource)<=iLen){return sSource;}if(typeof(ELIDED)=='undefined'||ELIDED==null){ELIDED="..."}var str="";var l=0;var schar;for(var i=0;schar=sSource.charAt(i);i++){var charLen=(schar.match(/[^\x00-\xff]/)!=null?2:1);if(l>iLen-ELIDED.length-charLen){break;}else{str+=schar;l+=charLen;}}str+=ELIDED;return str;},_splitByTwoPart:function(srcstr,iLen){arrReturn={};sStr="";eStr="";if(this.getUnicodeLen(srcstr)<=iLen){sStr=srcstr;}else{var l=0;var schar;for(var i=0;i<srcstr.length;i++){schar=srcstr.charAt(i);var charLen=(schar.match(/[^\x00-\xff]/)!=null?2:1);if(l>iLen-charLen){eStr+=schar;}else{sStr+=schar;}l+=charLen;}}arrReturn['s']=sStr;arrReturn['e']=eStr;return arrReturn;},splitByLength:function(fullStr,splitLength,splicChar,userBr){fullStr=""+fullStr;splitLength=parseInt(splitLength);if(0==splitLength){splitLength=this.getUnicodeLen(fullStr)}var eachRow=[];var strReturn="";if(this.isNull(splicChar)){splicChar='<br />';}if(this.isNull(userBr)){userBr=true;}if(userBr){eachRow=fullStr.split(/<br[^<>]*>/img);}else{eachRow[0]=fullStr;}for(var i=0;i<eachRow.length;i++){if(this.isNull(eachRow[i])){eachRow[i]="";}var tmpStr=eachRow[i];while(!this.isNull(tmpStr)){arrTem={};arrTem=this._splitByTwoPart(tmpStr,splitLength);strReturn+=arrTem['s']+splicChar;tmpStr=arrTem['e'];}}test=strReturn=""+strReturn;strReturn=strReturn.replace(/(<br[^<>]*>[\r\n\t]*)$/ig,"");return strReturn;},getDomAttribute:function(clickObj){var objAttr={};if(clickObj.attributes&&clickObj.attributes.length){retval={};for(var i=0;i<clickObj.attributes.length;i++){var key=clickObj.attributes[i].nodeName;if(typeof(key)=="undefined")continue;var val=clickObj.attributes[i].nodeValue;if(!val)continue;key=key.toLowerCase();objAttr[key]=val;}}return objAttr;},getGlobalId:function(){var today,hour,second,minute,year,month,date;var strDate;today=new Date();year=today.getYear();month=today.getMonth()+1;date=today.getDate();hour=today.getHours();minute=today.getMinutes();second=today.getSeconds();strDate=""+year+month+date+hour+minute+second+parseInt(Math.random()*100);return strDate;},getCheckNumUrl:function(){var checkNumUrl="http://control.video.sina.com.cn/app/checknum/chknum.php?id="+this.getGlobalId();return checkNumUrl;},urlEndode:function(str){str=encodeURIComponent(str);return str;},$A:function(obj,attr){return obj.getAttribute(attr);},isLogin:function(type){var userinfo=this.getUserInfo();if(userinfo['uid']){return true;}return false;}};var hasInitBaseObject=true;baseObject.initBase();}
//
//#############################//

function toHex(dec){var hexChars="0123456789ABCDEF";if(dec>255)return null;var i=dec%16;var j=(dec-i)/16;var result=hexChars.charAt(j);result+=hexChars.charAt(i);return result;}function get_img_path(u){var n=256;var h1=parseInt(u);var h2=h1%n;var h3=toHex(h2);var h4=h3<10?"0"+h3:h3;h4=h3.toLowerCase();var h5=parseInt(u/n,10);var h6=h5%n;var h7=toHex(h6);var h8=h7<10?"0"+h7:h7;h8=h7.toLowerCase();return h8+"/"+h4;}function get_img_url_flash(u){var domain="http://vhead.blog.sina.com.cn/";var dir=get_img_path(u);var pic=domain+dir+"/"+u+".gif";if(""==u){return "http://vhead.blog.sina.com.cn/head/b_50.gif";}return pic;}function get_img_url(u){var domain="http://vhead.blog.sina.com.cn/";var dir=get_img_path(u);var pic=domain+dir+"/"+u+"s.gif";if(""==u){return "http://vhead.blog.sina.com.cn/head/b_50.gif";}return pic;}if(typeof(userImages)!='undefined'){userImages.show();}
//
//#############################//
String.prototype.cnLength=function(){return this.replace(/[^\x00-\xff]/g,"**").length}
// 对话框
var vDialog	= {
	sFrame:	'iframeShow',
	loding:	'<div style="text-align:center;font-size:12px;">正在读取数据...</div>',
	$:		function(_sID){
		return document.getElementById(_sID);
	},
	$$:		function(_sID){
		return document.frames ? document.frames[_sID] : this.$(_sID).contentWindow;
	},
    createWin:function(){    
        if(!this.$('win')){
        var objWin=document.createElement("div");
        var tBody=document.getElementsByTagName("BODY")[0];	
        objWin.id="win";
        objWin.style.cssText="position:absolute;display:none;top:0px;left:0px;z-index:90000;";
        tBody.appendChild(objWin);
        }

        if(!this.$('iframeShow')){
            this.$('win').innerHTML='<iframe id="iframeShow" onload="vDialog.iframeResize();" scrolling="no" frameborder="0" style="width:100%;height:100%;"></iframe>';
        }
    },
	set:	function(_sID){
        this.createWin();	    
		var cThis	= this.$(_sID);
		this.$('win').style.width	= cThis.style.width;
		this.$('win').style.height	= cThis.style.height;
	},
	self:	function(_sID){
		var sHTML	= this.$(_sID).innerHTML;
		this.$$('iframeShow').document.open("text/html","replace");
		this.$$('iframeShow').document.write(sHTML);
		this.$$('iframeShow').document.close();
	},
	getObj: function()
	{
		return this.$$('iframeShow');
	},
	writeObj:	function(str){
		this.$$('iframeShow').document.open("text/html","replace");
		this.$$('iframeShow').document.write(str);
		this.$$('iframeShow').document.close();
		
		
	},
	
	setSize:	function(_iWidth,_iHeight){
            this.createWin();	    
	        this.$('win').style.width	= _iWidth+'px';
	        this.$('iframeShow').style.width	= _iWidth+'px';
			this.$('win').style.height	=_iHeight+'px';
			this.$('iframeShow').style.height	=_iHeight+'px';
			this.$('win').style.display	= "block";

	},
	
	win:	function(_oThis, _sMake , _sUrl, _iWidth, _iHeight, _iTop, _iLeft){
        this.createWin();
		if(this.hide(_oThis, _sMake)){

			this.$('win').setAttribute('ctrl', _sMake);

			if(_iWidth)
				this.$('win').style.width	= _iWidth + 'px';
				this.$('iframeShow').style.width	= _iWidth+'px';
			if(_iHeight)
				this.$('win').style.height	= _iHeight + 'px';
				this.$('iframeShow').style.height	=_iHeight+'px';
			if(_iTop)
				this.$('win').style.top		= _iTop + 'px';
			if(_iLeft)
				this.$('win').style.left	= (_oThis.offsetLeft + _iLeft) + 'px';

			try{
				this.$$('iframeShow').document.open("text/html","replace");
				this.$$('iframeShow').document.write(this.loding);
				this.$$('iframeShow').document.close();
			}catch(e){}

			this.$('iframeShow').src			= _sUrl;
			this.$('win').style.display			= "block";

		}
	},
	hide:	function(_oThis, _sMake){
		var mark	= this.$('win').getAttribute('ctrl');
		if(this.$('win').style.display == 'block' && mark == _sMake){
			this.$('win').style.display = 'none';
			return false;
		}
		return true;
	},
	
	reset:	function(){
        this.createWin();
		this.$('win').style.display	= 'none';
	},

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -