自定义确认框 [英] custom confirmation box
本文介绍了自定义确认框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要一个自定义确认框,其中包含ok,取消按钮,而不是javascript确认onbeforeunload事件的标题。请帮帮我。
i need a custom confirmation box with ok , cancel button instead javascript confirm title on onbeforeunload event. please help me on this.
推荐答案
看看这个 https:/ /jqueryui.com/dialog/#modal-confirmation [ ^ ]
除了解决方案1:
您还可以找到大量的第三方jQuery UI插件 - ins统称为模态弹出窗口,具有不同的视觉效果,例如过渡,特别是屏幕其余部分的变暗: http:// bit.ly/1DpajUJ 。
这种解决方案的好处不仅仅是视觉效果。这种轻量级方法对用户来说总是更好。 JavaScript嵌入式警报和确认对话框创建了一个新窗口,不方便,不灵活,看起来很难看。
如果你需要学习jQuery(强烈推荐),请参阅:
http://en.wikipedia.org/wiki/JQuery ,>
http://jquery.com ,
http://learn.jquery.com ,
http://learn.jquery.com/using-jquery-core ,
http://learn.jquery.com/about-jquery/how-jquery-works (从这里开始)。
请记住,jQuery在设计时考虑了兼容性。
-SA
In addition to Solution 1:
You can also find plenty of 3rd-party jQuery UI plug-ins collectively known as "modal popup", with different visual effects, such as transitions, and, notably, dimming of the rest of the screen: http://bit.ly/1DpajUJ.
The benefit of such solution is not just visual effects. This light-weight approach is always better for the user. JavaScript embedded alert and confirmation dialogs create a new window, which is inconvenient, not flexible, looks ugly.
If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery,
http://jquery.com,
http://learn.jquery.com,
http://learn.jquery.com/using-jquery-core,
http://learn.jquery.com/about-jquery/how-jquery-works (start from here).
Remember that jQuery is designed with compatibility in mind.
—SA
这篇关于自定义确认框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文