您目前尚未登陆,请选择【登陆】或【注册
首页->电子商务->NetShopForge网上商店程序(VB)源码>>Website/js/Boot.js>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:NetShopForge网上商店程序(VB)源码


当前文件路径:NetShopForge/Website/js/Boot.js 文件类型
普通视图
		            
1var gbN2LibMonMigrated = true; 2var N2Loaded = false; 3var n2LMStart = new Date(); 4var gaN2CSSLibs = new Array(); 5var gaN2JSLibs = new Array(); 6var oTheDoc = document; 7var oTheBody = oTheDoc.body; 8var oTheHead = document.getElementsByTagName('head').item(0); 9var n2sRTW1='onload'; 10var n2sRTWTBS='simplepopoverloaded'; 11function N2Initializer () { 12this.aHandlers = new Array(); 13this.aEventsRun = new Array(); 14this.bCoreLoaded = false; 15} 16new N2Initializer (); 17N2Initializer.prototype.runThisWhen = function (sWhen, fFn, sComment) { 18if ( (typeof fFn != 'function') || fFn == null) return false; 19sWhen = sWhen.toLowerCase(); 20if ( (sWhen =='inbody' && document.body) || this.aEventsRun[sWhen] ){ 21fFn(); 22} else { 23this.aHandlers[this.aHandlers.length] = { sWhen: sWhen, fFn: fFn, sComment: sComment }; 24} 25return true 26} 27N2Initializer.prototype.initializeThis = N2Initializer.prototype.runThisWhen 28N2Initializer.prototype.loadThisWhen = function (sWhen, sURL, sID, sComment) { 29sWhen = sWhen.toLowerCase(); 30goN2LibMon.monitorLoad (sID); 31if ( sWhen =='now' ) { 32n2LoadScript(sURL, true, sID); 33} else { 34this.aHandlers[this.aHandlers.length] = { sWhen: sWhen, sURL: sURL, sID: sID, sComment: sComment }; 35} 36return true 37} 38N2Initializer.prototype.run = function (sWhen) { 39sWhen = (typeof sWhen == 'undefined') ? null : sWhen; 40sWhen = sWhen.toLowerCase(); 41this.aEventsRun[sWhen] = true; 42if (sWhen == 'coreloaded') { this.bCoreLoaded=true; } 43if (window.goN2Debug) goN2Debug.info("N2Initializer called with " + (sWhen ? "'"+sWhen+"'" : "null")); 44var aH = this.aHandlers; 45var len = aH.length; 46for (var i=0;i<len;i++) { 47var oTmp = aH[i]; 48if ((oTmp.bCalled != true) && 49(oTmp.fFn || oTmp.sURL) && 50( (sWhen == null) || (oTmp.sWhen && (oTmp.sWhen == sWhen))) 51) { 52if ((oTmp.sWhen == 'coreloaded') && !this.bCoreLoaded) continue; 53if (window.goN2Debug) ; 54if (oTmp.fFn) { 55oTmp.fFn(); 56} else if (oTmp.sURL) { 57n2LoadScript(oTmp.sURL, true, oTmp.sID); 58} 59oTmp.bCalled = true; 60} 61} 62} 63goN2Initializer = new N2Initializer(); 64function n2RunThisWhen (sWhen, fFn, sComment) { 65goN2Initializer.runThisWhen(sWhen, fFn, sComment); 66} 67function n2LoadThisWhen (sWhen, sURL, sID, sComment) { 68goN2Initializer.loadThisWhen(sWhen, sURL, sID, sComment); 69} 70function n2RunIfLoaded (sLibID, fFn, sComment) { 71n2RunThisWhen(sLibID+'loaded', fFn, 'sequenced init of '+ sComment); 72} 73function n2LoadScript (sURL, bLocalCacheOK, sLibID) { 74if (sLibID) { goN2LibMon.requestLoad (sLibID); } 75var e = oTheDoc.createElement("script"); 76e.type="text/javascript"; 77if (bLocalCacheOK) { 78e.src = sURL; 79} else { 80e.src = sURL + (sURL.indexOf('?') == -1 ? '?' : '&') + 'lt='+ new Date().getTime(); 81} 82oTheHead.appendChild(e); 83} 84function N2LibraryMonitor() { 85this.aLibs = {}; 86this.bJSLoaded=false; 87this.bCSSLoaded=false; 88this.sNotLoaded ='A desirable part of the page did not load. Please refresh the page to try again. \n'; 89this.nTimer=null; 90this.nTimeoutMs = 10000; 91} 92new N2LibraryMonitor(); 93N2LibraryMonitorProto = N2LibraryMonitor.prototype; 94N2LibraryMonitor.prototype.monitorLoad = function (sLibID) { 95this.aLibs[sLibID] = { sID: sLibID, nDuration: -1 }; 96} 97N2LibraryMonitor.prototype.requestLoad = function (sLibID, sFeatureID) { 98var oTmp = this.aLibs[sLibID]; 99if (oTmp) { oTmp.nDuration= -2; } 100this.resetTimer(); 101} 102N2LibraryMonitor.prototype.beginLoad = function (sLibID, sFeatureID) { 103var oTmp = this.aLibs[sLibID]; 104if (oTmp) { 105oTmp.sFeature = sFeatureID; 106oTmp.nBegin = new Date().getTime(); 107oTmp.nDuration= -3; 108} 109}; 110N2LibraryMonitor.prototype.endLoad = function (sLibID, nStatus) { 111var oTmp = this.aLibs[sLibID]; 112if (oTmp) { oTmp.nDuration = new Date().getTime() - oTmp.nBegin; oTmp.bLoaded=true;} 113var bALL; 114if (bALL=this.allLibsLoaded()) { 115this.clearTimer(); 116} else { 117this.resetTimer(); 118} 119goN2Initializer.run(sLibID+'loaded'); 120if (bALL) { 121goN2Initializer.run('lastlibraryloaded'); 122} 123} 124N2LibraryMonitorProto.clearTimer=function() { 125if (this.nTimer) { 126clearTimeout(this.nTimer); 127this.nTimer = null; 128} 129} 130N2LibraryMonitorProto.resetTimer=function() { 131if (this.nTimer) { 132clearTimeout(this.nTimer); } 133this.nTimer = setTimeout(n2LibraryLoadTimeout, this.nTimeoutMs); 134} 135function n2LibraryLoadTimeout() { 136goN2Initializer.run('libraryloadfailed'); 137} 138N2LibraryMonitor.prototype.allLibsLoaded = function () { 139var bAllLoaded=true; 140for (var key in this.aLibs) { 141if (this.aLibs[key] && this.aLibs[key].nDuration <0) { bAllLoaded=false; } 142} 143this.bJSLoaded = bAllLoaded; 144return bAllLoaded; 145} 146N2LibraryMonitor.prototype.confirmJSLoaded = function() { return this.bJSLoaded; } 147N2LibraryMonitor.prototype.confirmCSSLoaded = function() { this.bCSSLoaded=true; } 148N2LibraryMonitor.prototype.isJSLoaded = function() { return this.bJSLoaded; } 149N2LibraryMonitor.prototype.isCSSLoaded = function() { return this.bCSSLoaded; } 150N2LibraryMonitor.prototype.status = function() { 151if (this.bJSLoaded) return "OK!"; 152else return this.sNotLoaded; 153} 154N2LibraryMonitor.prototype.stats = function() { return "N/A"; }; 155goN2LibMon = new N2LibraryMonitor(); 156var n2LLStop = new Date(); 157var n2LMStop = new Date(); 158function N2ConfigBase() { 159this.getValue = function(id,d) { 160if(typeof this[id] != 'undefined') { return this.id; } 161else { return d; } } } 162var goN2ConfigBase = new N2ConfigBase(); 163document.write('<link href="http://www.dangdang.com/css/pop.css" type="text/css" rel="stylesheet">'+ 164''); 165goN2LibMon.monitorLoad ("utilities"); 166goN2LibMon.monitorLoad ("events"); 167goN2LibMon.monitorLoad ("simplePopover"); 168document.write('<script language="javascript" src="http://www.dangdang.com/js/a_20051231.js" type="text/javascript"></script><\/script>'+ 169'<script language="javascript" src="http://www.dangdang.com/js/c_20051231.js" type="text/javascript"></script><\/script>'+ 170'<script language="javascript" src="http://www.dangdang.com/js/b_20051231.js" type="text/javascript"></script><\/script>'+ 171''); 172var goCust = new Object(); 173goCust.isLoggedIn=function() { return false; } 174var goN2Explorer; 175var gaTD; 176var goN2AC; 177n2RunThisWhen (n2sRTWTBS, 178function() { 179oAllCatPopover = new N2SimplePopover(); 180goN2Events.registerFeature('two-tabs', 'oAllCatPopover', 'n2MouseOverHotspot', 'n2MouseOutHotspot'); 181goN2Events.setFeatureDelays('two-tabs',200, 400, 200); 182oAllCatPopover.initialize('AllCatPopoverDiv', 'oAllCatPopover',null,null,'below','c'); 183}, 184'All Categories popover'); 185n2RunThisWhen(n2sRTW1, 186function() { 187if (!window.gaTD) gaTD = new Array(); 188N2Loaded = goN2LibMon.isJSLoaded(); 189}, "Last Init" 190); 191
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:NetShopForge网上商店程序(VB)源码

- COCOWO1.0开源博客源码

- Asp.net2.0开发的网上图书销..

- 塞普森调查问卷系统(Asp.net..

- AjaxPro入门实例之用户验证

- Asp.net客户管理系统源码

- Asp.net魔兽世界代练网站系统..

- Asp.net在线投票系统(51aspx..

- E-Commerce入门新闻系统

51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号