?? object.js
字號:
// Description: js.lang.Object 基類
// Author: Wan Changhua
// Version: 2004.02.09.01
_package("js.lang");
_import("js.lang.Class");
function js.lang.Object() {
this.window = window;
var _classPath = null;
this.getClassPath = function() {
if (_classPath == null) _classPath = $js_classpath + this.className.replace(/\./gi, "\/");
return _classPath;
};
var _codeBase = null;
this.getCodeBase = function() {
if (_codeBase == null) {
_classPath = this.getClassPath();
var idx = _classPath.lastIndexOf("\/");
_codeBase = _classPath.substring(0, idx);
}
return _codeBase;
};
this.toString = function() {
return("[jclass/object]:" + this.className);
};
this.getClass = function() {
return Class.forName(this.className);
};
this.getClassLoader = function() {
//TODO
}
this.clone = function() {
//TODO
};
this.instanceOf = function(c) {
return Class.forName("js.lang.Class").instanceOf(this, c);
};
this.getUID = function() {
if (typeof(this.uniqueID) == "undefined") {
this.uniqueID = "obj_"
+ (new Date()).getTime()
+ Math.round(Math.random() * 1000);
eval("window." + this.uniqueID + " = this;");
}
return this.uniqueID;
};
}
//var _p = js.lang.Object._extends("Object");
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -