当前位置:网站首页>Bimianhongfu queren()
Bimianhongfu queren()
2022-07-01 08:40:00 【Haihong AA】
Button background may take a long time , During this period, if the customer can't wait to click the button again , May trigger repeatedly .
For example, asset depreciation , Running for a long time .

So you can make a hf_running Of hiddenfield object , Set the value 1 Indicates running ,0 It means that there is no . Pure for compatibility js.
It's sealed :
// Avoid re running , Need to add one hf_running Control for . usage :
//if (!bimianchongfu.queren(' Confirm to continue ?')) return;
// Execute specific business code
// After the execution , Empty hf_running Or change it to 0
var bimianchongfu = {
kongjian: { objRunning: "hf_running" },
// Check if it is running , And prompt , And set the values
queren: function (AConfirmMsg, lShowAlert, strShowAlert, lMarkIsRunning) {
var rt = this.zhengzaiyunxing(lShowAlert, strShowAlert, false);// Check is running
if (rt) return false; // Running , return
// confirm
var s = AConfirmMsg;
if (AConfirmMsg == undefined || AConfirmMsg == null) s = "";
if (s != "") if (!(rt = confirm(s))) return false;
//
if (lMarkIsRunning == undefined || lMarkIsRunning == null || lMarkIsRunning == true)
this.set("1");
//
return true;
},
// Read whether it is running
zhengzaiyunxing: function (lShowAlert, strShowAlert, lMarkIsRunning) {
var obj = this.kongjian.objRunning, v = "", l = false, s = strShowAlert, lAlert = lShowAlert;
if (obj == undefined || obj == null) obj = document.getElementById("hf_running");
else if (typeof (obj) == "string") obj = document.getElementById(obj);
if (obj == undefined || obj == null) obj = document.getElementById("hf_running");
if (obj != null && this.kongjian.objRunning == null) this.kongjian.objRunning = obj;// write down
v = obj.value; // Value
l = !(v == undefined || v == null || v == "" || v == "0" || v == "false");
// Prompt information
if (l) { // Running
if (lShowAlert == undefined || lShowAlert == null) lAlert = true;
if (strShowAlert == undefined || strShowAlert == null) s = " Running , Please wait a moment ";
if (lAlert && s != "") alert(s);
} else { // Is not running , Mark as running
if (lMarkIsRunning == undefined || lMarkIsRunning == null || lMarkIsRunning == true)
this.set("1");
}
// Complete return
return l;
},
// Set the value
set: function (val) {
var obj = this.kongjian.objRunning, tp = typeof (obj);
if (tp == "object") obj.value = val;
else if (tp == "string") document.getElementById(obj).value = val;
else document.getElementById("hf_running").value = val;
}
};边栏推荐
- 《微机原理》——微处理器内部及外部结构
- 明明设计的是高带宽,差点加工成开路?
- SPL installation and basic use (II)
- Review of week 280 of leetcode
- Yolov5 advanced 7 target tracking latest environment setup
- 19Mn6 German standard pressure vessel steel plate 19Mn6 Wugang fixed binding 19Mn6 chemical composition
- Advanced API
- Introduction to R language
- What is the material of 15CrMoR, mechanical properties and chemical analysis of 15CrMoR
- DID的使用指南,原理
猜你喜欢

Centos7 shell脚本一键安装jdk、mongo、kafka、ftp、postgresql、postgis、pgrouting

shardingSphere

《MATLAB 神经网络43个案例分析》:第30章 基于随机森林思想的组合分类器设计——乳腺癌诊断

《微机原理》—总线及其形成

Matlab tips (16) consistency verification of matrix eigenvector eigenvalue solution -- analytic hierarchy process

机动目标跟踪——当前统计模型(CS模型)扩展卡尔曼滤波/无迹卡尔曼滤波 matlab实现

Screenshot tips

Intelligent constant pressure irrigation system

Mavros sends a custom topic message to Px4

明明设计的是高带宽,差点加工成开路?
随机推荐
MD文档中插入数学公式,Typora中插入数学公式
2022 examination summary of quality controller civil engineering direction post skills (quality controller) and reexamination examination of quality controller civil engineering direction post skills
Public network cluster intercom +gps visual tracking | help the logistics industry with intelligent management and scheduling
用C语言编程:用公式计算:e≈1+1/1!+1/2! …+1/n!,精度为10-6
毕业论文中word的使用1-代码域标公式
Audio-AudioRecord create(一)
Advanced C language pointer (Part 2)
View drawing process analysis
FreeRTOS学习简易笔记
《单片机原理及应用》—定时器、串行通信和中断系统
Leetcode t39: combined sum
分享2022上半年我读过的7本书
[Yu Yue education] Shandong Vocational College talking about railway reference materials
It is designed with high bandwidth, which is almost processed into an open circuit?
leetcode T31:下一排列
Redis publish subscription
[detailed explanation of Huawei machine test] judgment string subsequence [2022 Q1 Q2 | 200 points]
vscode自定义各个区域的颜色
Leetcode t31: prochain arrangement
【MFC开发(16)】树形控件Tree Control