当前位置:网站首页>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;
}
};边栏推荐
- 软件工程师面试刷题网站、经验方法
- Leetcode t40: combined sum II
- 1.jetson与摄像头的对接
- 我想知道手机注册股票开户的流程?另外,手机开户安全么?
- Internet of things technology is widely used to promote intelligent water automation management
- Only in China! Alicloud container service enters the Forrester leader quadrant
- 任务、线程、进程 区别
- Mavros sends a custom topic message to Px4
- Public network cluster intercom +gps visual tracking | help the logistics industry with intelligent management and scheduling
- MySQL8.0学习记录17 -Create Table
猜你喜欢

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

【MFC开发(17)】高级列表控件List Control

Glitch free clock switching technology

内存大小端

性能提升2-3倍!百度智能云第二代昆仑芯服务器上线
![[detailed explanation of Huawei machine test] judgment string subsequence [2022 Q1 Q2 | 200 points]](/img/0f/972cde8c749e7b53159c9d9975c9f5.png)
[detailed explanation of Huawei machine test] judgment string subsequence [2022 Q1 Q2 | 200 points]

Centos7 shell script one click installation of JDK, Mongo, Kafka, FTP, PostgreSQL, PostGIS, pgrouting

Huawei machine test questions column subscription Guide

TypeError: __init__() got an unexpected keyword argument ‘autocompletion‘

C语言指针的进阶(上篇)
随机推荐
Redis publish subscription
Configuration and startup of Chang'an chain synchronization node
【js逆向】md5加密参数破解
Agrometeorological environment monitoring system
Yolov5 advanced six target tracking environment construction
[untitled]
Advanced C language pointer (Part 2)
Nacos - 服务发现
个人装修笔记
【C】 Summary of wrong questions in winter vacation
Properties of 15MnNiNbDR low temperature vessel steel, Wugang 15MnNiDR and 15MnNiNbDR steel plates
How to recruit Taobao anchor suitable for your own store
Leetcode t29: divide two numbers
Mavros sends a custom topic message to Px4
明明设计的是高带宽,差点加工成开路?
Intelligent water and fertilizer integrated control system
Manually dig XSS vulnerabilities
MD文档中插入数学公式,Typora中插入数学公式
Glitch free clock switching technology
Leetcode t31: next spread