当前位置:网站首页>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;
}
};边栏推荐
- Share 7 books I read in the first half of 2022
- Memory size end
- Yolov3, 4, 5 and 6 Summary of target detection
- Advanced API
- ARM v7的体系结构A、R、M区别,分别应用在什么领域?
- Leetcode t40: combined sum II
- MD文档中插入数学公式,Typora中插入数学公式
- Burpsuite -- brute force cracking of intruder
- Audio audiorecord create (I)
- Vscode customize the color of each area
猜你喜欢

機動目標跟踪——當前統計模型(CS模型)擴展卡爾曼濾波/無迹卡爾曼濾波 matlab實現

3、Modbus通讯协议详解

【MFC开发(16)】树形控件Tree Control
![Thread safety analysis of [concurrent programming JUC] variables](/img/f9/a3604bec6f7e5317dd2c578da73018.jpg)
Thread safety analysis of [concurrent programming JUC] variables

Introduction to R language

factory type_id::create过程解析

The era of low threshold programmers is gone forever behind the sharp increase in the number of school recruitment for Internet companies

Only in China! Alicloud container service enters the Forrester leader quadrant

Principle and application of single chip microcomputer - principle of parallel IO port

【面试必刷101】链表
随机推荐
It is designed with high bandwidth, which is almost processed into an open circuit?
Brief introduction to AES
FreeRTOS学习简易笔记
公网集群对讲+GPS可视追踪|助力物流行业智能化管理调度
AES简单介绍
挖财打新股安全吗
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
分享2022上半年我读过的7本书
【面试必刷101】链表
Foundation: 2 The essence of image
Only in China! Alicloud container service enters the Forrester leader quadrant
[深度剖析C语言] —— 数据在内存中的存储
MySQL8.0学习记录17 -Create Table
Tita OKR: a dashboard to master the big picture
【MFC开发(17)】高级列表控件List Control
What is 1cr0.5mo (H) material? 1cr0.5mo (H) tensile yield strength
Mavros sends a custom topic message to Px4
The data analyst will be ruined without project experience. These 8 project resources will not be taken away
Glitch Free时钟切换技术
C语言指针的进阶(下)