2012年12月3日 星期一

LAB30


按鈕怪怪的 要按兩下才會多一張圖片

...............................................................................................................................................................
回家做按鈕
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title> lab26 </title>
  <script>
function build()
{
myImg = document.createElement("IMG")
myImg.setAttribute("id","imageOne")
myImg.setAttribute("src","http://airsnarf.shmoo.com/airsnarf.jpg")
docBody = document.getElementsByTagName("body").item(0)
docBody.appendChild(myImg)
}
window.onload=build
  </script>
</head>
<body>
<br>
</body>
</html>

沒有留言:

張貼留言