var LDoc = function() {
this.version = '0.1' ;
// 月份是从0开始计数的
this.develop_date = new Date(2009,(7 - 1) ,28 , 15 , 23,45).toLocaleString() ;
this.appPath = this.getAppPath();
this.skin = this.skin || 'xp';
//alert(this.appPath);
} ;
LDoc.prototype = {
getAppPath: function(){
var script = document.getElementsByTagName("script");
for (var i = 0; i < script.length; i++) {
var match = script[i].src.match(/.*Lighttpd-docxu.js($|\?.*)/);
if (match) {
var matchSkin = script[i].src.match(/.*Lighttpd-docxu\.js\?skin=/);
if(matchSkin)
this.skin = script[i].src.replace(/.*Lighttpd-docxu\.js\?skin=/, '');
return script[i].src.replace(/Lighttpd-docxu\.js.*/, '');
}
}
} ,
include: function(f,autoAddSuffix,outside) {
outside = outside || false ; //outside为true加载外部js
//autoAddSuffix = autoAddSuffix || true ;//缺省为false
if (autoAddSuffix) f += ".js" ;
if (!outside) f = this.appPath + f ;
document.write("<script src='@{file}' type='text/javascript'></script>".replace('@{file}',f));
} ,
log: function(){
alert(this.appPath);
}
};
var current = new LDoc();
current.log();
current.include('jq-1.2.6.min',true);
current.include('http://www.google.com/jsapi',false,true);
出现问题的重现代码如上所示...
在 将 这行 current.include('jq-1.2.6.min',true); 替换成 current.include('jq-1.3.2.min',true);时,第一次加载没有问题,但是你只要重新刷新2次或者三次,将出现如下界面...
此 bug 仅仅出现在Firefox上,在IE上没有问题,如果使用jquerry1.2.6则无此问题,jquery1.3.1的版本尚未测试...
我的Firefox 版本为:
使用FF纯属用来调试JS之用,没有想到用来平时使用,不然就悔死了...
这个bug暂时没有找到问题的解决方案,估计是内存泄露造成FF崩溃
大小: 53.5 KB
大小: 30.6 KB
查看图片附件
转载请注明原文地址: https://ju.6miu.com/read-1125971.html