摘要:<!DOCTYPE html><html><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>我的作業(yè)</title>
<style media="screen">
*{margin: 0px;height: 0px;}
#CeShi{width: 200px;height: 200px;background-color: pink;margin: 50px 130px;}
input{width: 80px;height: 30px;text-align: center;line-height: 30px;}
</style>
</head>
<body>
<script type="text/javascript">
var box;
window.onload=function(){
box=document.getElementById('CeShi')
}
function Widths(){
box.style.width="400px"
}
function Heights(){
box.style.height="400px"
}
function Colors(){
box.style.backgroundColor="red"
}
function Reductions(){
box.style.width="200px"
box.style.height="200px"
box.style.backgroundColor="pink"
}
function Hides(){
box.style.display="none"
}
function Displays(){
box.style.display="block"
}
</script>
<div id="CeShi"></div>
<input type="button" name="" value="改變寬度"onclick="Widths()">
<input type="button" name="" value="改變高度"onclick="Heights()">
<input type="button" name="" value="改變顏色"onclick="Colors()">
<input type="button" name="" value="還原"onclick="Reductions()">
<input type="button" name="" value="隱藏"onclick="Hides()">
<input type="button" name="" value="顯示"onclick="Displays()">
</body>
</html>
老師講的時(shí)候看著很簡單,也都明白,到了自己練習(xí),就出了各種問題,大多是因?yàn)榇中脑斐傻?丟三落四,還是需要加強(qiáng)練習(xí),養(yǎng)成好的書寫習(xí)慣
批改老師:滅絕師太批改時(shí)間:2019-03-02 09:04:12
老師總結(jié):主要是眼高手低,多多練習(xí)熟練了就不會這樣了,完成的不錯!繼續(xù)加油!