+ 6
Can we give background color to an alertbox in a javascript program using css?If so how is it possible.
5 Respuestas
+ 6
Thanks all for helping
+ 4
the answer is yes...and no....
there is the alert() which simply alerts you and is supplied by javascript, but the color of the box cannot be changed, buttons cannot be change, 'about:blank' message you see on top, also can not be changed
however you can use jquery to create and customize the colors, buttons, just about anything
i will post a code in a bit demonstrating the two boxes
edit
look in my codes
0
Ive never heard of this but i looked it up and some say its possible and some say its not.... But heres a link that maybe able to help you out:
http://stackoverflow.com/questions/7853130/how-to-change-the-style-of-alert-box
0
You can't really, and even if you could it'd be browser dependent.
I'd create a new element, pushed to the top using:
position: fixed
and
z-index: 100
to create a dialog box that is purely an element. Then modify the contents of it with JS via innerHTML or jquery.