admin管理员组文章数量:1277900
Hi I have been looking to create custom buttons in an alert box I would like them to say Go and Cancel instead of OK and cancel
onClick="if(confirm('Would you like to continue?'))
Hi I have been looking to create custom buttons in an alert box I would like them to say Go and Cancel instead of OK and cancel
onClick="if(confirm('Would you like to continue?'))
Share
Improve this question
edited Feb 19, 2011 at 1:10
KJYe.Name
17.2k5 gold badges50 silver badges63 bronze badges
asked Feb 18, 2011 at 21:26
JackJack
311 gold badge1 silver badge2 bronze badges
3 Answers
Reset to default 4No, there is no cross-browser support for opening a confirmation dialog that is not the default OK/Cancel pair, but you can build them with JavaScript such as jQuery Alert Dialogs, jQuery impromptu, Mootools LightFace and many more.
You can't, as far I know. The button caption are not customizable by design.
It is needed to avoid possible fraud (think what can happen if you switch the caption of confirm and cancel buttons).
With this its possible,
http://www.codeproject./Articles/28812/Custom-Alert-Boxes-using-JavaScript-and-the-DOM
本文标签: javascriptAre custom buttons possible in an alert boxStack Overflow
版权声明:本文标题:javascript - Are custom buttons possible in an alert box? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741295918a2370814.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论