当前位置:网站首页>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;
}
};边栏推荐
- 爬虫知识点总结
- 《微机原理》——微处理器内部及外部结构
- There are many problems in sewage treatment, and the automatic control system of pump station is solved in this way
- 毕业论文中word的使用1-代码域标公式
- Leetcode t34: find the first and last positions of elements in a sorted array
- 2022 mechanical fitter (primary) examination summary and mechanical fitter (primary) reexamination examination
- 中考体育项目满分标准(深圳、安徽、湖北)
- Review of week 280 of leetcode
- V79.01 Hongmeng kernel source code analysis (user mode locking) | how to use the fast lock futex (Part 1) | hundreds of blogs analyze the openharmony source code
- How to recruit Taobao anchor suitable for your own store
猜你喜欢
![[JS reverse] MD5 encryption parameter cracking](/img/06/0610045d287f646479d6eb5021a067.png)
[JS reverse] MD5 encryption parameter cracking

What is the material of 16MnDR, the minimum service temperature of 16MnDR, and the chemical composition of 16MnDR

C basic knowledge review (Part 4 of 4)

Gateway-88

【面试必刷101】链表
![[untitled]](/img/40/560c597d53d27eff860644cd7c3030.png)
[untitled]

Glitch Free时钟切换技术

Nacos - 服务发现

《单片机原理与应用》——并行IO口原理

SPL installation and basic use (II)
随机推荐
How to use OKR as the leadership framework of marketing department
Introduction to 18mnmo4-5 steel plate executive standard and delivery status of 18mnmo4-5 steel plate, European standard steel plate 18mnmo4-5 fixed rolling
Leetcode t31: next spread
如何招到适合自己店铺的淘宝主播
Properties of 15MnNiNbDR low temperature vessel steel, Wugang 15MnNiDR and 15MnNiNbDR steel plates
[深度剖析C语言] —— 数据在内存中的存储
Advanced API
Pipeline detection of UAV Based on gazebo
SPL-安装与基本使用(二)
[no title] free test questions for constructor municipal direction general foundation (constructor) and theoretical test for constructor municipal direction general foundation (constructor) in 2022
2022.2.15
win7 pyinstaller打包exe 后报错 DLL load failed while importing _socket:参数错误
The use of word in graduation thesis
Public network cluster intercom +gps visual tracking | help the logistics industry with intelligent management and scheduling
Screenshot tips
Foundation: 2 The essence of image
FreeRTOS学习简易笔记
SPL-介绍(一)
Maneuvering target tracking -- current statistical model (CS model) extended Kalman filter / unscented Kalman filter matlab implementation
Foundation: 3 Opencv getting started images and videos