如题:<!DOCTYPE HTML>
<html>
<head>
<title>test</title>
</head>
<body>
<script type="text/javascript">
window.onload = function(){
var img = new Image();
//如何为动态创建的Image对象设置手形。
//img.style.cursor = "hand";
img.onload = function(){
var myId = document.getElementById("myId");
myId.appendChild(img);
}
img.src = "http://avatar.csdn.net/6/5/2/2_jackzhang1204.jpg";
}
</script>
<div id="myId"></div>
</body>
</html>
<html>
<head>
<title>test</title>
</head>
<body>
<script type="text/javascript">
window.onload = function(){
var img = new Image();
//如何为动态创建的Image对象设置手形。
//img.style.cursor = "hand";
img.onload = function(){
var myId = document.getElementById("myId");
myId.appendChild(img);
}
img.src = "http://avatar.csdn.net/6/5/2/2_jackzhang1204.jpg";
}
</script>
<div id="myId"></div>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货