confirm

jQuery)扩展jQuery系列之一 模拟alert,confirm

依然范特西╮ 提交于 2019-11-30 08:29:43
全部代码 复制代码 代码如下: /** * @author xing */ (function($){ $.extend({ alert:function(html,callback){ var dialog=new Dialog(); dialog.build('alert',callback,html); }, confirm:function(html,callback){ var dialog=new Dialog(); dialog.build('confirm',callback,html); } }); var Dialog=function(){ var render={ template:' <div class="alertParent"><div class="alertContent"><h2 class="title">系统提示</h2><div class="alertHtml">你的操作出现错误!</div><div class="btnBar"><input type="button" value="确定" id="sure"/></div></div></div>', templateConfirm:' <div class="alertParent" id="confirmPanel"><div class="alertContent"><h2

Dont ask confirm if user submit the form

谁都会走 提交于 2019-11-30 03:50:08
问题 I am using following JavaScript code to warn a user if he tries to redirect to another page without submitting the form. window.onbeforeunload = function() { return 'Are you sure that you want to leave this page?'; }; This is working fine.But my problem is when user trying to submit the form using submit button confirm box will be appear. I don't want to ask the confirm if user submitting the form,otherwise I want to ask confirm. How is it possible? 回答1: maintain a state variable. when user

Do browsers localize the OK and Cancel buttons of the javascript confirm popup?

流过昼夜 提交于 2019-11-30 00:28:17
问题 In a multi-language web site, can I rely on the javascript confirm to translate the text of the Ok/Cancel buttons? If so, is it related to the browser or OS language setting? 回答1: The OK/Cancel button in Internet Explorer will obey the Operating System UI language settings. The technical reason is that IE is using the MessageBox Win32 API call to display its Javascript dialog box. That API relies on the OS UI language and not the browser UI language, as it is owned by the OS. As for 3rd party

分布式事务

拜拜、爱过 提交于 2019-11-29 21:59:02
分布式事务 分布式理论 单个数据库的性能产生瓶颈的时候,我们可能对数据库进行分区,这里所说的分区是指物理分区,分区之后可能不同的库就处于不同的服务器上了,这个时候单个数据库的ACID已经不能适应这种情况了,而在这种ACID的集群环境下,再想保证集群的ACID会导致我们的系统变得很差,这个时候我们需要引入CAP原则。 一致性(Consistency) : 客户端知道一系列的操作都会同时发生(生效) 可用性(Availability) : 每个操作都必须以可预期的响应结束 分区容错性(Partition tolerance) : 即使出现单个组件无法可用,操作依然可以完成 具体地讲在分布式系统中,在任何数据库设计中,一个Web应用至多只能同时支持上面的两个属性。显然,任何横向扩展策略都要依赖于数据分区。因此,设计人员必须在一致性与可用性之间做出选择。 [了解] 数据库支持2PC,又叫XA Transactions,MySQL5.5、SQL Server2005、Oracle7开始支持。 其中,XA是一个两阶段提交协议,该协议分为以下两个阶段: ·第一阶段:事务协调器要求每个涉及到事务的数据库预提交(precommit)此操作,并反映是否可以提交。 ·第二阶段:事务协调器要求每个数据库提交数据。 如果任何一个数据库否决此次提交,那么所有数据库都会被要求回滚它们在次数据库中的那部分信息

JQuery confirm dialog [duplicate]

老子叫甜甜 提交于 2019-11-29 20:51:55
Possible Duplicate: Yes or No confirm box using jQuery I see a lot of examples here about replacements for jQuerys standard confirm dialog but don't understand any of them. If I want to pop-up a confirm dialog using jQuery or jQueryUI. How can i do it and retrieve what button the user clicked ? Surely there must be a simple way to set up a confirm dialog like an alert("Something!"); command. Add two buttons to it and set a call back function on yes or no ? Try this one $('<div></div>').appendTo('body') .html('<div><h6>Yes or No?</h6></div>') .dialog({ modal: true, title: 'message', zIndex:

Fastreport.net绑定参数 数据打印

余生颓废 提交于 2019-11-29 15:59:28
一、引入Fastreport.dll 此处忽略 二、创建report.frx文件 如果需要的可以加入公众号“办公好技巧”,找我要个文件。 三、绑定数据 1.设置变量参数,例如:subject 2.创建数据源 添加sql语句 编辑语句: SELECT D.train_info_id, D.train_edition, D.train_subject, D.train_user, D.train_data, D.train_address, D.train_class_hour, D.train_scope, D.train_content, D.train_count, D.train_inputuser, D.train_part_fuzeren, D.train_kaohe_type, D.train_result, D.train_confirm_user, D.trainner_confirm_date, D.username, D.partname, D.confirm_tag, D.train_list_id FROM dbo."View_userlist_train_info" D where D.train_subject= @subject ; 后面subject就是刚才设置的参数,保持一致哦。 绑定参数来源 完成 来源: oschina 链接: https:/

Fastreport.net绑定参数 数据打印

瘦欲@ 提交于 2019-11-29 15:58:07
一、引入Fastreport.dll 此处忽略 二、创建report.frx文件 如果需要的可以加入公众号“办公好技巧”,找我要个文件。 三、绑定数据 1.设置变量参数,例如:subject 2.创建数据源 添加sql语句 编辑语句: SELECT D.train_info_id, D.train_edition, D.train_subject, D.train_user, D.train_data, D.train_address, D.train_class_hour, D.train_scope, D.train_content, D.train_count, D.train_inputuser, D.train_part_fuzeren, D.train_kaohe_type, D.train_result, D.train_confirm_user, D.trainner_confirm_date, D.username, D.partname, D.confirm_tag, D.train_list_id FROM dbo."View_userlist_train_info" D where D.train_subject= @subject ; 后面subject就是刚才设置的参数,保持一致哦。 绑定参数来源 完成 来源: oschina 链接: https:/

Javascript - rename confirm() buttons

独自空忆成欢 提交于 2019-11-29 09:18:50
By default, there are two buttons:"ok" and "cancel" in confirm(). Is there a way to rename them? http://dev.w3.org/html5/spec-preview/user-prompts.html#simple-dialogs According to the standard that defines confirm() , there is no way to specify custom button labels. The browser must display an OK/Cancel prompt to comply with HTML5. No, there isn't. Confirm only takes one argument and that is the message itself. http://dev.w3.org/html5/spec-preview/user-prompts.html#dom-confirm Keep in mind these dialogs are modal and blocking, which means once they are executed you lose control over the

jConfirm with this existing code

只谈情不闲聊 提交于 2019-11-29 07:59:42
I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } If I just change confirm to jConfirm this not enough to make it work... Thanks for your help Lena function logout() { jConfirm('Do you really want to logout?', 'Logout', function(r) { if (r) window.location.href = "logout.php"; }); } EDIT for comments: function sid(id){ $_sidId = id; jConfirm("Delete System ID for " + id + "?", 'Delete Sid', function(r) { if (r){ window.location.href = "del_sid.php?id=" + $_sidId;

关于用户名密码不能为空

安稳与你 提交于 2019-11-29 06:17:20
function login(){ //得到name输入框对象 var name = document.getElementById(“name”); //判断输入框是否有内容 if(name.value.length 0){ confirm(“用户名不能为空”); return false; } var pass = document.getElementById(“pass”); if(pass.value.length 0){ confirm(“密码不能为空”); return false; } return true; } 来源: https://blog.csdn.net/qq_43417276/article/details/89974023