grgw_old_java/heatsupply2/WebContent/static/baidu/js/script/doubleSubmit.js

20 lines
403 B
JavaScript
Raw Permalink Normal View History

2025-07-01 14:56:45 +08:00
/**
* 防止重复提交
*/
var checkSubmitFlg = false;
function checkSubmit(submit_id) {
if (checkSubmitFlg == true) {
return false;
}
checkSubmitFlg = true;
document.getElementById(submit_id).disabled=true;
window.history.forward(1);
location.replace(this.href);
return true;
}
document.onclick = function doconclick() {
if (checkSubmitFlg) {
window.event.returnValue = false;
}
};