abstract:<!doctype html><html><head><meta charset="utf-8"><title>javascript</title><style type="text/css">#box{ width:200px; height:200px; backgrou
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>javascript</title>
<style type="text/css">
#box{ width:200px; height:200px; background:#36F; margin:10px;}
</style></head><body>
<div id="box"></div>
<input type="button" value="變高" onclick="aa()">
<input type="button" value="變寬" onclick="bb()">
<input type="button" value="變色" onclick="cc()">
<input type="button" value="重置" onclick="dd()">
<input type="button" value="隱藏" onclick="ee()">
<input type="button" value="顯示" onclick="ff()">
<script type="text/javascript">
var box
window.onload=function(){box=document.getElementById("box")}
function aa(){box.style.height="300px"}
function bb(){box.style.width="300px"}
function cc(){box.style.background="red"}
function dd(){
box.style.height="200px"
box.style.width="200px"
box.style.background="#36F"
}
function ee(){box.style.display="none"}
function ff(){box.style.display="block"}
</script>
</body>
</html>
Correcting teacher:滅絕師太Correction time:2019-03-22 09:20:04
Teacher's summary:上課的練習比較簡單,案例可以自行拓展哦!