问题
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