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

📄 scriptloader.js

📁 JSVM核心类库,收集了JAVA进行JSVM开发必用技术进行归纳,在实际项目应用中直接引用相关类库即可现实JSVM相关功能!
💻 JS
字号:
// Description:	js.lang.ScriptLoader 脚本加载器,实现客户端的高速缓存
// Author:	Changhua.Wan
// Version:	2004.03.06.01

_package("js.lang");
_import("js.lang.Object");

function js.lang.ScriptLoader(_txtloader) {
	if (typeof(_txtloader) == "undefined")
		this.txtloader = Class.forName("js.io.TextLoader").getInstance();
	else
		this.txtloader = _txtloader;
}

var _p = js.lang.ScriptLoader._extends("js.lang.Object");
var _c = js.lang.ScriptLoader;

_p.load = function(_res, _reload) {
	try {
		var _code = this.txtloader.load(_res,_reload);
		if ( _code == null) return false;
		if (_res.indexOf(".js") != -1)
			this.loadCode(_code, "JavaScript");
		else if (_res.indexOf(".vbs") != -1)
			this.loadCode(_code, "VBScript");
		else
			this.loadCode(_code);
		return true;
	} catch(ex) {
		ex.printStactTrace();
		_throw(ex);
	}
}
_p.loadCode = function(_code, _language) {
	if (typeof(_language) != "string")
		execScript(_code);
	else
		execScript(_code, _language);
}

⌨️ 快捷键说明

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