Yes/No buttons instead of OK/Cancel in a confirm() dialog?

怎甘沉沦 提交于 2020-01-04 03:40:10

问题


In an Adobe AIR (HTML/JS) app, is it possible to display Yes/No buttons, instead of OK/Cancel in a confirm() dialog?

Anything that works with webkit should work.

Here's a related question, but all of the answers utilise jQuery, which I don't want to add just for this.


回答1:


I don't believe so. In JS, confirm() is specified to only use the OK and Cancel buttons.

If you want something more complicated, you'll have to make your own dialog, or use a third-party one that provides your desired functionality (yes, including jQuery, unfortunately).




回答2:


It's not possible to customise the confirm() dialog.

There are some suggestions at Javascript Customize Confirm with "Yes" or "No" but it pins down to using jQuery or implementing your own version of the jQuery dialog.



来源:https://stackoverflow.com/questions/15447358/yes-no-buttons-instead-of-ok-cancel-in-a-confirm-dialog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!