adtest.js
来自「这是一个基于ADuC开发的一个LCD液晶屏显示程序」· JavaScript 代码 · 共 37 行
JS
37 行
document.onclick=doDragStartUnionAd;
function doDragStartUnionAd() {
var thisSrcElement = event.srcElement;
var thisurl = "";
var thisSrcElementTd = thisSrcElement;
while (thisSrcElementTd.thisadSign != "xuedeziUnionAd" && thisSrcElementTd.parentElement !=null) {
thisSrcElementTd = thisSrcElementTd.parentElement;
}
if ((thisSrcElement.tagName == "IMG" && thisSrcElementTd.thisadSign == "xuedeziUnionAd") || (thisSrcElement.tagName == "AREA" && thisSrcElementTd.thisadSign == "xuedeziUnionAd")) {
if (thisSrcElement.tagName == "IMG") {
thisSrcElement = thisSrcElement.parentElement;
thisurl = thisSrcElement.href;
thisSrcElement = thisSrcElement.parentElement;
}else{
thisurl = thisSrcElement.href;
thisSrcElement = thisSrcElement.parentElement.parentElement;
}
if (thisSrcElement.tagName == "TD") {
thisadid = thisSrcElement.id;
thisuname = thisSrcElement.thisusername;
}
if (thisurl != "") {
thisurl = replaceStr(thisurl);
window.open("/perweb/unionad/adtest_1.asp?uname="+ thisuname +"&thisadid="+ thisadid +"&tourl=" + thisurl,"clickadwindow");
return false;
}
}
thisSrcElement = null;
thisSrcElementTd = null;
}
function replaceStr(thisurlStr) {
while (thisurlStr.indexOf("&") >= 0) {
thisurlStr = thisurlStr.replace("&","--");
}
return thisurlStr;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?