摘要:<!doctype html><html> <head> <meta charset="UTF-8"> <meta name="Generator" content="1m"> <meta name="Author&q
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="Generator" content="1m">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<!-- <link rel="stylesheet" type="text/css" href="css/">
<link rel="shortcut icon" type="image/x-icon" href="img/标题logo" -->
<title>JavaScript控制DIV样式</title>
<style type="text/css">
#box{width:100px;height:100px;background:red;margin:100px 105px;}
</style>
</head>
<body>
<script type="text/javascript">
var box
window.onload=function(){
box=document.getElementsById('box')}
function aa(){
box.style.height="420px;"//改变高度
}
function bb(){
box.style.width="400px;"//改变宽度
}
function cc(){
box.style.background="pink"//改变颜色
}
</script>
<!-- 用按钮控制div的高度 宽度 颜色 重置 隐藏 显示 -->
<div id="box" class="" >
</div>
<input type="button" value="变高">
<input type="button" value="变宽">
<input type="button" value="变色">
<input type="button" value="重置">
<input type="button" value="隐藏">
<input type="button" value="显示">
</body>
</html>
批改老师:西门大官人批改时间:2019-03-03 10:02:48
老师总结:如果有较多的视频只能看一半,建议先把浏览器换成chrome试试,如果不行,可以向班主任反馈一下,这边会即时处理。