Click here to Skip to main content
15,347,383 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

Can you please help me to display custom title in alert using javascript

Rahul Jain
Updated 12-Mar-21 19:26pm
Mohamed Mitwalli 1-May-12 4:13am
Google and you will find your answer

You cannot modify the title of the alert.

JavaScript alert box with custom title[^]
also see this discussion[^]
Yes, we cannot modify the title of the alert. But we can have custom alert using DIV & CSS similar to modal ups.
It's impossible for security you cannot modify the title
I tried this :(
make custom using css.
change text of this div.
just show and hide this div using javascript.

don't need to use alert(); this is very simple solution
Richard Deeming 15-Mar-21 10:04am
As already mentioned in Solution 2, posted back in 2012 when this question was asked.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900