Javascript确认对话框 [英] Javascript Confirm dialogbox

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

问题描述

我正在调用确认(你确定要删除);

然后我得到标准的Ok和Cancel按钮,默认为Ok。 br />


因为这是删除有没有办法,除了创建自定义对话框之外,将默认按钮更改为取消按钮?或者甚至反转方框的文字?



谢谢..

解决方案

不幸的是,没有影响内置对话框外观和行为的方法。



所以你要么用 jquery例如 [ ^ ],或者您更改问题公式以获得godd默认按钮:而不是您确定要删除它吗?问:你最好保留这个吗? :)

I am calling the confirm("Are you sure you want to delete");
then I get the standard "Ok" and "Cancel" buttons with "Ok" as the default.

Because this is a delete is there a way, other than creating a custom dialog box, the change the default button to be the "Cancel" button? Or even reverse the text of the boxes?

Thanks..

解决方案

Unfortunately, there is no way to influence the appearance and the behavior of the built-in dialog.

So you either make a custom dialog with jquery for example[^], or you change the question formulation to have the godd default button: instead of "Are you sure you want to delete this?" ask "Would you better keep this?" :)


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

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