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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -