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?
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...>"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With