开发者

Are custom buttons possible in an alert box?

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开发者_开发知识库?'))


No, 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.com/Articles/28812/Custom-Alert-Boxes-using-JavaScript-and-the-DOM

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜