javascript - Formating in Alert Message with addition of image -


is possible achieve formatting of text in js alert message?

<script> function myfunction() { alert("1.enter name. 2. enter mobile no. 3.do not press  button."); } </script> 

i want these 3 messages appear 1 below other. tried:

<p>1.enter name.</p><p> 2. enter mobile no.</p><p> 3.do not press button.</p> 

didn't work. also, wish add img src tag after last message:

<img src="http://forums.nextgames.com/resources/emoji/smiley.png" alt="smily"/> 

thank you.

the browser alert box not support rendering html, can use plain-text formatting \n newline , \t tab.

alert("1.enter name.\n2. enter mobile no.\n3.do not press button."); 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -