color text in alert window

maqskywalker
maqskywalker used Ask the Experts™
on
i saw this example
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_str_fontcolor

In an alert window. Is there a way to color the message green and font to Arial in the alert window?

alert(result);
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Director of Technologyy
Commented:
Unfortunately, the answer is no.  However in this case this is where you usually use a javascript library that generates something similar to an alert box, like https://noelboss.github.io/featherlight/
Michael VasilevskySolutions Architect
Commented:
You cannot format the text in an alert box. The workaround is to use a custom dialog box like in jQuery UI

Author

Commented:
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial