Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
23
rated 0 times [  27] [ 4]  / answers: 1 / hits: 27218  / 12 Years ago, mon, march 12, 2012, 12:00:00

Is it possible to insert HTML code in a JavaScript confirm box?



I just tried & it does not seem to work (I try to add a HTML link), see my code below



<html> 
<head>
<script type=text/javascript> function show_alert() { confirm(<a href=www.url.com>Link text</a>); } </script>
</head>
<body>
<input type=button onclick=show_alert() value=Show alert box />
</body>
</html>


I suspect I might have to use a library such as jquery-ui's dialog to get this working


More From » html

 Answers
2

You can only insert plaintext to alert(), confirm() and prompt() boxes.


[#86898] Sunday, March 11, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
debras

Total Points: 307
Total Questions: 98
Total Answers: 112

Location: Maldives
Member since Tue, Dec 21, 2021
2 Years ago
;