📄 demo.js
字号:
function testErrOutput(objErrors){ var message = objErrors.generalError + '<br />'; if (objErrors.fieldErrors) { for (var ii = 0; ii < objErrors.fieldErrors.length; ii++) message += (ii + 1) + ': Field "' + objErrors.fieldErrors[ii].field.name + '" ' + objErrors.fieldErrors[ii].errorMessage + "<br />"; } var outputDiv = document.getElementById("errOutput"); if(outputDiv != null){ outputDiv.innerHTML = message; outputDiv.style.display = "block"; }}function myOnSuccess() { var outputDiv = document.getElementById("errOutput"); if(outputDiv != null){ outputDiv.innerHTML = '';//clear error message if any outputDiv.style.display = "none"; } alert('Success!');};function myDebug(message){ var debugContainer = document.getElementById("debugContainer"); if(debugContainer == null){ debugContainer = document.createElement("div"); debugContainer.id = "debugContainer"; var st = debugContainer.style; st.position = "absolute"; st.top = "0"; st.right = "0"; st.width = "500px"; st.height = "100px"; st.overflow = "scroll"; st.backgroundColor = "#EEEEEE"; st.fontSize = "small"; document.body.appendChild(debugContainer); Zapatec.ScrollWithWindow.register(debugContainer); } debugContainer.innerHTML += message.replace(/&/g, '&').replace(/</g, "<").replace(/>/g, ">").replace(/\n/g, "<br />") + "<br />";}function checkIfLoadedFromHDD(){ if(document.location.toString().indexOf('http') != 0) { alert('Since this example demonstrates interaction between server and javascript application, it must be loaded from server. This example does not work if opened from local hard drive.'); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -