摘要:<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">&
<!DOCTYPE html>
<html lang="en">
<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>changediv</title>
<style>
#box{width:100px;height:100px;background: red;margin: 20px 80px;}
</style>
</head>
<body>
<div id='box'></div>
<input type="button" value="变宽" onclick="Javascript:return document.getElementById('box').style.width='400px'">
<input type="button" value="变高" onclick="Javascript:return document.getElementById('box').style.hight='400px'">
<input type="button" value="变色" onclick="Javascript:return document.getElementById('box').style.background='red'">
<input type="button" value="重置" onclick="Javascript:return document.getElementById('box').style.height('400px').Width('400').background('red')">
<input type="button" value="隐藏" onclick="Javascript:return document.getElementById('box').style.display='none'">
<input type="button" value="显示" onclick="Javascript:return document.getElementById('box').style.display='block'">
</body>
</html>