Javascript中的警报框只能显示纯文本。您可以使用jQuery之类的Javascript库来显示模式吗?
您可以这样做:
<!doctype html><html lang="en"><head> <meta charset="utf-8" /> <title>jQuery UI Dialog - Default functionality</title> <link rel="stylesheet" href="http://pre.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <script src="http://pre.jquery.com/jquery-1.9.1.js"></script> <script src="http://pre.jquery.com/ui/1.10.3/jquery-ui.js"></script> <script> body { font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; font-size: 62.5%;} </script> <script> $(function() { $( "#dialog" ).dialog(); }); </script></head><body><div id="dialog" title="Basic dialog"> <p>Image:</p> <img src="http://placehold.it/50x50" alt="Placeholder Image" /></div></body></html>


