?? webresource.axd
字號(hào):
}
if (typeof(preCallBackResult) == "undefined" || preCallBackResult) {
var inputType = control.getAttribute("type");
inputType = (inputType == null) ? '' : inputType.toUpperCase();
if (inputType == "IMAGE" && e != null) {
var form = Anthem_GetForm();
if (e.offsetX) { // IE
Anthem_SetHiddenInputValue(form, eventTarget + ".x", e.offsetX);
Anthem_SetHiddenInputValue(form, eventTarget + ".y", e.offsetY);
} else { // FireFox + ???
var offset = GetControlLocation(control);
Anthem_SetHiddenInputValue(form, eventTarget + ".x", e.clientX - offset.x + 1 + window.pageXOffset);
Anthem_SetHiddenInputValue(form, eventTarget + ".y", e.clientY - offset.y + 1 + window.pageYOffset);
}
}
if (imageUrlDuringCallBack || textDuringCallBack) {
var nodeName = control.nodeName.toUpperCase();
if (nodeName == "INPUT") {
if (inputType == "CHECKBOX" || inputType == "RADIO" || inputType == "TEXT") {
preProcessOut.OriginalText = GetLabelText(control.id);
SetLabelText(control.id, textDuringCallBack);
} else if (inputType == "IMAGE") {
if (imageUrlDuringCallBack) {
preProcessOut.OriginalText = control.src;
control.src = imageUrlDuringCallBack;
} else {
preProcessOut.ParentElement = control.parentElement ? control.parentElement : control.parentNode;
if (preProcessOut.ParentElement) {
preProcessOut.OriginalText = preProcessOut.ParentElement.innerHTML;
preProcessOut.ParentElement.innerHTML = textDuringCallBack;
}
}
} else if (inputType == "SUBMIT" || inputType == "BUTTON") {
preProcessOut.OriginalText = control.value;
control.value = textDuringCallBack;
}
} else if (nodeName == "SELECT" || nodeName == "SPAN") {
preProcessOut.OriginalText = GetLabelText(control.id);
SetLabelText(control.id, textDuringCallBack);
} else {
preProcessOut.OriginalText = control.innerHTML;
control.innerHTML = textDuringCallBack;
}
}
// Disable the control during callback if required
control.disabled = (typeof(enabledDuringCallBack) == "undefined") ? false : !enabledDuringCallBack;
return true;
} else {
// Callback cancelled
if (typeof(callBackCancelledFunction) == "function") {
callBackCancelledFunction(control, e);
}
return false;
}
} else {
// Validation failed
return false;
}
}
function Anthem_PreProcessCallBackOut() {
// Fields
this.ParentElement = null;
this.OriginalText = '';
}
function Anthem_PostProcessCallBack(
result,
control,
e,
eventTarget,
clientCallBack,
clientCallBackArg,
imageUrlDuringCallBack,
textDuringCallBack,
postCallBackFunction,
preProcessOut
) {
if (typeof(postCallBackFunction) == "function") {
postCallBackFunction(control, e);
}
// Re-enable the control if it was disabled during callback
control.disabled = false;
var inputType = control.getAttribute("type");
inputType = (inputType == null) ? '' : inputType.toUpperCase();
if (inputType == "IMAGE") {
var form = Anthem_GetForm();
Anthem_RemoveHiddenInput(form, eventTarget + ".x");
Anthem_RemoveHiddenInput(form, eventTarget + ".y");
}
if (imageUrlDuringCallBack || textDuringCallBack) {
var nodeName = control.nodeName.toUpperCase();
if (nodeName == "INPUT") {
if (inputType == "CHECKBOX" || inputType == "RADIO" || inputType == "TEXT") {
SetLabelText(control.id, preProcessOut.OriginalText);
} else if (inputType == "IMAGE") {
if (imageUrlDuringCallBack) {
control.src = preProcessOut.OriginalText;
} else {
preProcessOut.ParentElement.innerHTML = preProcessOut.OriginalText;
}
} else if (inputType == "SUBMIT" || inputType == "BUTTON") {
control.value = preProcessOut.OriginalText;
}
} else if (nodeName == "SELECT" || nodeName == "SPAN") {
SetLabelText(control.id, preProcessOut.OriginalText);
} else {
control.innerHTML = preProcessOut.OriginalText;
}
}
if (typeof(clientCallBack) == "function") {
clientCallBack(result, clientCallBackArg);
}
}
function Anthem_FireCallBackEvent(
control,
e,
eventTarget,
eventArgument,
causesValidation,
validationGroup,
imageUrlDuringCallBack,
textDuringCallBack,
enabledDuringCallBack,
preCallBackFunction,
postCallBackFunction,
callBackCancelledFunction,
includeControlValuesWithCallBack,
updatePageAfterCallBack
) {
// Cancel the callback if the control is disabled. Although most controls will
// not raise their callback event if they are disabled, the LinkButton will.
// This check is for the LinkButton. See SourceForge Patch 1639700.
if (control.disabled) return;
var preProcessOut = new Anthem_PreProcessCallBackOut();
var preProcessResult = Anthem_PreProcessCallBack(
control,
e,
eventTarget,
causesValidation,
validationGroup,
imageUrlDuringCallBack,
textDuringCallBack,
enabledDuringCallBack,
preCallBackFunction,
callBackCancelledFunction,
preProcessOut
);
if (preProcessResult) {
var eventType = e.type;
Anthem_FireEvent(
eventTarget,
eventArgument,
function(result) {
Anthem_PostProcessCallBack(
result,
control,
eventType,
eventTarget,
null,
null,
imageUrlDuringCallBack,
textDuringCallBack,
postCallBackFunction,
preProcessOut
);
},
null,
includeControlValuesWithCallBack,
updatePageAfterCallBack
);
}
}
function AnthemListControl_OnClick(
e,
causesValidation,
validationGroup,
textDuringCallBack,
enabledDuringCallBack,
preCallBackFunction,
postCallBackFunction,
callBackCancelledFunction,
includeControlValuesWithCallBack,
updatePageAfterCallBack
) {
var target = e.target || e.srcElement;
if (target.nodeName.toUpperCase() == "LABEL" && target.htmlFor != '')
return;
var eventTarget = target.id.split("_").join("$");
Anthem_FireCallBackEvent(
target,
e,
eventTarget,
'',
causesValidation,
validationGroup,
'',
textDuringCallBack,
enabledDuringCallBack,
preCallBackFunction,
postCallBackFunction,
callBackCancelledFunction,
true,
true
);
}
// Returns the top, left control location in FireFox
function GetControlLocation(control) {
var offsetX = 0;
var offsetY = 0;
var parent;
for (parent = control; parent; parent = parent.offsetParent) {
if (parent.offsetLeft) {
offsetX += parent.offsetLeft;
}
if (parent.offsetTop) {
offsetY += parent.offsetTop;
}
}
return { x: offsetX, y: offsetY };
}
function GetLabelText(id) {
var labels = document.getElementsByTagName('label');
for (var i = 0; i < labels.length; i++) {
if (labels[i].htmlFor == id) {
return labels[i].innerHTML;
}
}
return null;
}
function SetLabelText(id, text) {
var labels = document.getElementsByTagName('label');
for (var i = 0; i < labels.length; i++) {
if (labels[i].htmlFor == id) {
labels[i].innerHTML = text;
return;
}
}
}
// Used by encodeURIComponentNew to mimic function encodeURIComponent in
// IE 5.5+, Netscape 6+, and Mozilla
function utf8(wide) {
var c, s;
var enc = "";
var i = 0;
while(i<wide.length) {
c= wide.charCodeAt(i++);
// handle UTF-16 surrogates
if (c>=0xDC00 && c<0xE000) continue;
if (c>=0xD800 && c<0xDC00) {
if (i>=wide.length) continue;
s= wide.charCodeAt(i++);
if (s<0xDC00 || c>=0xDE00) continue;
c= ((c-0xD800)<<10)+(s-0xDC00)+0x10000;
}
// output value
if (c<0x80) enc += String.fromCharCode(c);
else if (c<0x800) enc += String.fromCharCode(0xC0+(c>>6),0x80+(c&0x3F));
else if (c<0x10000) enc += String.fromCharCode(0xE0+(c>>12),0x80+(c>>6&0x3F),0x80+(c&0x3F));
else enc += String.fromCharCode(0xF0+(c>>18),0x80+(c>>12&0x3F),0x80+(c>>6&0x3F),0x80+(c&0x3F));
}
return enc;
}
var hexchars = "0123456789ABCDEF";
function toHex(n) {
return hexchars.charAt(n>>4)+hexchars.charAt(n & 0xF);
}
var okURIchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-";
// Mimics function encodeURIComponent in IE 5.5+, Netscape 6+, and Mozilla
function encodeURIComponentNew(s) {
var s = utf8(s);
var c;
var enc = "";
for (var i= 0; i<s.length; i++) {
if (okURIchars.indexOf(s.charAt(i))==-1)
enc += "%"+toHex(s.charCodeAt(i));
else
enc += s.charAt(i);
}
return enc;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -