2014年5月5日 星期一
Lab 19 Lab Form and Action
<html>
<body>
<FORM METHOD="GET" ACTION="http://google.com/search" NAME="f" >
Search Page: <INPUT TYPE="text" NAME="q" >
<INPUT TYPE="submit" VALUE="submit">
</FORM>
</body>
</html>
<body>
<FORM METHOD="GET" ACTION="http://google.com/search" NAME="f" >
Search Page: <INPUT TYPE="text" NAME="q" >
<INPUT TYPE="submit" VALUE="submit">
</FORM>
</body>
</html>
2014年5月3日 星期六
Lab 15 九九乘法表
<html>
<body>
<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)
}
window.onload = buildTable
</script>
</head>
<body>
</body>
</html
<body>
<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)
}
window.onload = buildTable
</script>
</head>
<body>
</body>
</html
訂閱:
文章 (Atom)