当前位置:网站首页>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;
}
};边栏推荐
- Count number of rows per group and add result to original data frame
- 任务、线程、进程 区别
- Glitch Free时钟切换技术
- 2022 Chinese cook (technician) simulation test and Chinese cook (technician) practice test video
- Agrometeorological environment monitoring system
- 2022.2.15
- MATLAB【函数和图像】
- leetcode T31:下一排列
- Brief introduction to AES
- 【MFC开发(16)】树形控件Tree Control
猜你喜欢

Qt的模型与视图

shardingSphere

DID的使用指南,原理

Properties of 15MnNiNbDR low temperature vessel steel, Wugang 15MnNiDR and 15MnNiNbDR steel plates

15Mo3 German standard steel plate 15Mo3 chemical composition 15Mo3 mechanical property analysis of Wuyang Steel Works

C语言指针的进阶(上篇)

Advanced level of C language pointer (Part 1)

避免按钮重复点击的小工具bimianchongfu.queren()

Foundation: 2 The essence of image

【无标题】
随机推荐
What is the material of 15CrMoR, mechanical properties and chemical analysis of 15CrMoR
機動目標跟踪——當前統計模型(CS模型)擴展卡爾曼濾波/無迹卡爾曼濾波 matlab實現
factory type_ Id:: create process resolution
Field agricultural irrigation system
Leetcode t29: divide two numbers
《单片机原理与应用》——并行IO口原理
中考体育项目满分标准(深圳、安徽、湖北)
Centos7 shell脚本一键安装jdk、mongo、kafka、ftp、postgresql、postgis、pgrouting
MySQL8.0学习记录17 -Create Table
Matlab [function derivation]
It is designed with high bandwidth, which is almost processed into an open circuit?
SPL-安装与基本使用(二)
Redis publish subscription
I would like to know the process of stock registration and account opening by mobile phone? In addition, is it safe to open a mobile account?
yolov5训练可视化指标的含义
15Mo3 German standard steel plate 15Mo3 chemical composition 15Mo3 mechanical property analysis of Wuyang Steel Works
3、Modbus通讯协议详解
SPL installation and basic use (II)
Introduction to 18mnmo4-5 steel plate executive standard and delivery status of 18mnmo4-5 steel plate, European standard steel plate 18mnmo4-5 fixed rolling
Nacos - 服务发现