Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image In JavaScript Alert

I know it's a unwise question but if it's possible -

Can we show a image in JavaScript alert box?

If it's possible, How can we do this?

like image 522
Ishan Jain Avatar asked Jun 24 '13 04:06

Ishan Jain


1 Answers

No. You cannot display an image inside JavaScript's native alert() box.

Side note: alert() displays what's given to it as input as pure text, meaning you cannot pass a string containing an <img> tag to it and expect it to display an image - it will instead display the string "<img src...>".

like image 185
techfoobar Avatar answered Sep 25 '22 03:09

techfoobar