moz.js
来自「WAPmo手机网站管理平台是一款创建与管理维护WAP网站的的软件产品」· JavaScript 代码 · 共 69 行
JS
69 行
Event.prototype.__defineGetter__("srcElement", function()
{
var node = this.target;
while (node && node.nodeType != 1) node = node.parentNode;
return(node);
});
Event.prototype.__defineGetter__("fromElement", function()
{
var node = null;
if (this.type == "mouseover")
{
node = this.relatedTarget;
}
else if (this.type == "mouseout")
{
node = this.target;
}
while (node && node.nodeType != 1) node = node.parentNode;
return(node);
});
Event.prototype.__defineGetter__("toElement", function()
{
var node = null;
if (this.type == "mouseout")
{
node = this.relatedTarget;
}
else if (this.type == "mouseover")
{
node = this.target;
}
while (node && node.nodeType != 1) node = node.parentNode;
return(node);
});
Event.prototype.__defineGetter__("offsetX", function()
{
return(this.layerX);
});
Event.prototype.__defineGetter__("offsetY", function()
{
return(this.layerY);
});
HTMLElement.prototype.__defineGetter__("parentElement", function()
{
if (this.parentNode == this.ownerDocument) return(null);
return(this.parentNode);
});
HTMLElement.prototype.__defineGetter__("innerText", function()
{
return(this.textContent);
});
HTMLElement.prototype.__defineSetter__("innerText", function(argv)
{
this.textContent = argv;
});
Object.prototype.__defineGetter__("lastIndex", function()
{
var arr = this;
return(arr.index + arr[0].length);
});
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?