【发布时间】:2011-09-21 23:38:00
【问题描述】:
我尝试将此 javascript 用于 clcik 一次,但我无法获得结果 谁能告诉我这个脚本有什么问题
function clickOnce(btn, msg) {
// Test if we are doing a validation
//if (typeof (Page_ClientValidate) == 'function') {
// if we are doing a validation, return if it's false
//if (Page_ClientValidate() == false) { return false; }
//}
// Ensure that the button is not of type "submit"
if (btn.getAttribute('type') == 'button') {
// The msg attibute is absolutely optional
// msg will be the text of the button while it's disabled
if (!msg || (msg = 'undefined')) { msg = 'Loading...'; }
btn.value = msg;
// The magic :D
btn.disabled = true;
}
return true;
}
谁能告诉我这个脚本有什么问题
【问题讨论】:
标签: javascript model-view-controller html