TrainSignManage/WebFrame/myJS/XY_Base.js
(开头部分) 16KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
@Name:公共组件
@Author: Await[http://leotheme.cn]
@Mail: yltfy2008@gmail.com
@Update:2013/03/05 16:06
*/
var Util = typeof $ === "function" ? window.$ : {};
Util.config = {
JSfile: "" //设置JS文件夹路径
};
$("head").find("script").each(function () {
var src = $(this).attr("src");
if (src != undefined) {
if (src.indexOf("XY_Base") != -1) {
src = src.substring(0, src.lastIndexOf("/") + 1);
Util.config.JSfile = src;
};
}
});
Util.getName = function(a) {
return document.getElementsByName(a);
};
Util.getID = function(id) {
return document.getElementById(id);
};
Util.getTag = function(ele, oParent) {
return(oParent || document).getElementsByTagName(ele);
};
Util.ct = function(txt) {
return document.createTextNode(txt);
};
Util.ce = function(name) {
return document.createElement(name);
};
// 阻止事件冒泡
Util.stopBubble = function(e) {
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
}
// 阻止浏览器默认行为
Util.stopDefault = function(e) {
e.preventDefault ? e.preventDefault() : e.returnValue = false;
}
// 清除文本选择
Util.clSelect = function() {
try {
window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
} catch(_) {};
};
//获取当前样式
Util.getStyle = function(element) {
return element.currentStyle || document.defaultView.getComputedStyle(element, null);
};
//清除IFrame
Util.clearIframe = function() {
if(Util.Browser.isIE) { CollectGarbage(); setTimeout("CollectGarbage()", 1);
}
};
//判断ID是否存在
Util.exid = function(id) {
后面还有 574 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。