如何创建确认消息框 [英] How Do I Create Confirm Message Box

查看:64
本文介绍了如何创建确认消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用yes或no创建一个确认消息框,我根据那些是或否选项决定

解决方案

例如,你可以使用jQuery dialiog: http://jqueryui.com/dialog [ ^ ]。



有许多第三方组件,特别是jQuery UI插件,统称为作为模态弹出窗口,具有不同的功能,效果等: http://bit.ly/1Ag0G43 [ ^ ]。



这样做的好处解决方案是在同一网页上模拟模态行为。真正的弹出窗口(创建一个新的浏览器窗口)是丑陋的,令人恼火的,并且可以被使用为此目的开发的特殊浏览器插件的用户阻止;并且嵌入在JavaScript中的 confirm 函数只是丑陋,依赖于平台而且不灵活。



-SA


在按钮或链接按钮中,您想要弹出确认消息,请记下此代码的按钮



 OnClientClick =  返回确认('你确定吗?');  


i want to create a confirm message box with yes or no and i have decide based on those yes or no options

解决方案

For example, you can use jQuery dialiog: http://jqueryui.com/dialog[^].

There are many 3rd-party components, in particular, jQuery UI plug-ins collectively known as "modal pop-up", with different features, effects, etc: http://bit.ly/1Ag0G43[^].

The benefit of such solution is that the modal behavior is simulated on the same Web page. Real pop-ups (creating a new browser window) are ugly, irritating and can be blocked by users using special browser plug-ins developed for this purpose; and the confirm function embedded in JavaScript is just ugly, platform-dependent and not flexible.

—SA


in the button or link button where you want pop up as a confirm message write down this code for button

OnClientClick="return confirm('Are You Sure?');"


这篇关于如何创建确认消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆