1

I want to change a style of javascript alert box.As you can see in many website like
facebook,Here is alert boxex are stlyed.how can I do that.

user1752627
  • 2,527
  • 2
  • 15
  • 10
  • 5
    i dont believe you can change the native `window.alert()` style. it must've been a custom `
    ` you were seeing.
    – YS. Oct 21 '12 at 12:50
  • possible duplicate of [how to change the style of alert box](http://stackoverflow.com/questions/7853130/how-to-change-the-style-of-alert-box) – kapa Feb 21 '14 at 11:13

3 Answers3

1

You can't change it; it is implemented by the browser.

David G
  • 94,763
  • 41
  • 167
  • 253
0

You can't style the alert box.

You can create a div put the message in it style it with css and pop it up with javascript.

An example for this can be find in the jQuery UI dialog widget, DEMO

gdoron
  • 147,333
  • 58
  • 291
  • 367
0

You can not style alert box, what you could do is create a modal popup

eg.

http://jqueryui.com/dialog/

http://defunkt.io/facebox/

How to code a JavaScript modal popup (to replace Ajax)?

Community
  • 1
  • 1
MagePal Extensions
  • 17,646
  • 2
  • 47
  • 62