Wikipedia

2014年4月28日 星期一

lab20

(Common Gateway Interface/CGI)是一種重要的網際網路技術,可以讓一個客戶端,從網頁瀏覽器向執行在網路伺服器上的程序請求數據。CGI描述了客戶端和伺服器程序之間傳輸數據的一種標準。



   
<html>
<body>


<form name="search" action="http://maps.google.com/maps" method="get"    onsubmit="return check()">
search:<input type="text" name="q"  value=""><br>
<input type="submit" value="search"id="exampleForm">

<script>


function check(){
  var floatReg = /^[-|+]*[\d]*[.|\d][\d]*[,][-|+]*[\d]*[.|\d][\d]*$/;

  if(!floatReg.test(search.q.value)){
  alert("錯誤");
  search.q.value="";
  document .search.q.focus();
 
  return false;
 }
}
  </script>

</body>
</html> 
search:

lab19

   
<html>
<body>


<form name="find" action="http://google.com/search" method="get">
find:<input type="text" name="q"  value=""><br>
<input type="submit" value="search">


</body>
</html> find:

lab18

   
<html>
<body>


<img onmouseover ="src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZtzo1M7Z6u8SBx_DaiLqVs7bqGc8rYlmdMkvQARpUeHreUexwDFlAXNnlCjkn9NuUh1qr89PmUqxPH4FTItVWe__fwdsmFXodGUIksnV3lq2HPmCXVHaerXEh16bkx7Tahd5eSag1luA/s1600/%25E8%2580%2581%25E8%2599%258E.jpg'"
 onmouseout = "src='http://i.imgur.com/yfrb2.jpg'"
src="http://i.imgur.com/yfrb2.jpg"
width="304" height="228">



</script>
</body>
</html>







2014年4月16日 星期三

lab17

第1張



第2張



第3張

lab16

<<!DOCTYPE html>
<html> <head> <title>lab16</title> <script> function mOver(obj){ obj.setAttribute("src","https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZtzo1M7Z6u8SBx_DaiLqVs7bqGc8rYlmdMkvQARpUeHreUexwDFlAXNnlCjkn9NuUh1qr89PmUqxPH4FTItVWe__fwdsmFXodGUIksnV3lq2HPmCXVHaerXEh16bkx7Tahd5eSag1luA/s1600/%25E8%2580%2581%25E8%2599%258E.jpg"); } function mOut(obj){ obj.setAttribute("src","http://i.imgur.com/yfrb2.jpg"); } </script> </head> <body> <img border="0" src="http://pic1a.nipic.com/2008-09-11/2008911104157434_2.jpg" width="500" height="500" onmouseover="mOver(this)" onmouseout="mOut(this)"> </body> </html> https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZtzo1M7Z6u8SBx_DaiLqVs7bqGc8rYlmdMkvQARpUeHreUexwDFlAXNnlCjkn9NuUh1qr89PmUqxPH4FTItVWe__fwdsmFXodGUIksnV3lq2HPmCXVHaerXEh16bkx7Tahd5eSag1luA/s1600/%25E8%2580%2581%25E8%2599%258E.jpg phillysportslive.com
< lab16

lab15

<html> <body>
<button onclick="buildTable()">Try it</button> <script> function buildTable(){ docBody = document.getElementsByTagName("body").item(0) myTable = document.createElement("TABLE") myTable.id ="TableOne" myTable.border = 1 myTableBody = document.createElement("TBODY") for (i = 1; i <=9; i++){ row = document.createElement("TR") for (j = 1; j <=9; j++){ cell = document.createElement("TD") cell.setAttribute("WIDTH","50") cell.setAttribute("HEIGHT","50") textVal = i + "*" + j+"="+i*j textNode = document.createTextNode(textVal) cell.appendChild(textNode) row.appendChild(cell) } myTableBody.appendChild(row) } myTable.appendChild(myTableBody) docBody.appendChild(myTable) }
</script> </head> <body> </body> </html>






2014年4月7日 星期一

lab14

<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<input type="button" onclick="build()" text="click">
<title>lab14</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)
}
</script>
</head>
<body>
<br>
</body>
</html>






lab14