返回交作业交作业交......登陆

交作业交作业交作业

William Zhang2019-04-21 21:57:27189

<!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></title>

<style>

#box{width: 100px;height:100px;background:blue;margin:20px 80px;}

</style>

</head>

<body>

<div id="box"></div>

<input type="button" value="变高" onclick="changeHeight()">

<input type="button" value="变宽" onclick="changeWidth()">

<input type="button" value="变色" onclick="changeColor()">

<input type="button" value="重置" onclick="resetBox()">

<input type="button" value="隐藏" onclick="hideBox()">

<input type="button" value="显示" onclick="showBox()">

<script type="text/javascript">

var box;

window.onload=function(){

box=document.getElementById('box');

}

function changeHeight(){

box.style.height="400px";

}

function changeWidth(){

box.style.width="400px";

}

function changeColor(){

box.style.background="green";

}

function resetBox(){

box.style.height="100px";

box.style.width="100px";

box.style.background="blue";

}

function hideBox(){

box.style.display="none";

}

function showBox(){

box.style.display="block";

}

</script>

</body>

</html>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送