<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>lab34</title>
<script>
function build(){
myImg=document.createElement("IMG")
myImg.setAttribute("id","iamgeOne")
myImg.setAttribute("src","http://gamezblog.com/wp-content/uploads/2011/03/StarCraft-2.jpg")
docBody= document.getElementsByTagName("body").item(0)
docBody.appendChild(myImg)
}
</script>
</head>
<body>
<input name="myButton" value="Press This"
onclick="build()" type="button">
</body>
</html>
圖片檔:
沒有留言:
張貼留言