i don't guess. i know that this is in fact impossible. the reason is simple:
prompt() aswell as
confirm() were part of html + js since js exists.
this is essentially why they only allow you to play around with strings.
they were never intended to be feature rich.
they were actually invented out of the blue because the inventor (Brendan Eich) thought they'd come in handy. (wich at that time was more than enough for everyone)
they are by design blocking operations and should be avoided as much as possible.
to get around them simply create a so called modal dialog (thats basically a
position: fixed above the pages content.
you can easily make it appear as you want and you would not break any network connections or behavior of your application.
don't use w3schools as reference for learning or anything else.
they are a low quality database. you should look stuff up on mdn or other sites but should seriously avoid w3schools since it's not feature complete on any topic.
keep in mind this is an opinion.