是否可以在JavaScript确认框中插入HTML代码?
我刚尝试过它似乎没有用(我尝试添加HTML链接),请参阅下面的代码
<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>
Run Code Online (Sandbox Code Playgroud)
我怀疑我可能不得不使用诸如"jquery-ui的对话框"之类的库来实现这一点