admin管理员组

文章数量:1336585

The alert box/confirm box which we get in javascript are simple popup box. I need to modify the box style. Means to make the text bold, and to make these pop up stylish. How can I achieve that??

The alert box/confirm box which we get in javascript are simple popup box. I need to modify the box style. Means to make the text bold, and to make these pop up stylish. How can I achieve that??

Share Improve this question asked Dec 5, 2012 at 16:52 Ankit BansalAnkit Bansal 2,3589 gold badges53 silver badges82 bronze badges 2
  • 8 You can't modify the message box that results from the alert() and confirm() calls. You'll need to create your own custom alert box. You can use something like the jQuery UI dialog box: jqueryui./dialog – sbeliv01 Commented Dec 5, 2012 at 16:56
  • That ment should be an answer – MalSu Commented Dec 5, 2012 at 16:59
Add a ment  | 

2 Answers 2

Reset to default 4

You can't modify the message box that results from the alert() and confirm() calls. You'll need to create your own custom alert box. You can use something like the jQuery UI dialog box: http://jqueryui./dialog

This is not possible with traditional browse popups. You have to use a javascript/modal popup.

Here's an example:

http://jqueryui./dialog/#modal-confirmation

本文标签: jqueryStylish popup in javascriptStack Overflow