user1752627
user1752627

Reputation: 2607

How can change a styling of javascript alert button?

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.

Upvotes: 1

Views: 2768

Answers (3)

MagePal Extensions
MagePal Extensions

Reputation: 17656

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)?

Upvotes: 0

David G
David G

Reputation: 96855

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

Upvotes: 1

gdoron
gdoron

Reputation: 150313

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

Upvotes: 0

Related Questions