+ 4
Is it possible to use an <img> tag with alert function of javascript??
any answers
2 ответов
+ 6
Alert boxes in JavaScript can only display pure text. u can use jQuery.
+ 6
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js">
</script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js">
</script>
<style>
body {
font-family: "Helvetica", "Arial", "Verdana";
font-size: 50%;
}
</style>
<script> $(function() {
$( "#dialog" ).dialog();
});
</script>
</head>
<body>
<div id="dialog" title="Basic dialog">
<img src="https://lh6.googleusercontent.com/proxy/il4ieIDUq0fLDu0bopIX9MCPJklX7jq26nTWWmv4KWj3VcaR5sWrgMIYPZNazdKWWfW2pa8Uacq9qPVHgK_o-cb-2y0j-0N6uQ=w256-h256-nc" alt="Linux Brasil" />
</div>
</body>
</html>