<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<style type="text/css">
html,body{
width:590px;
height:590px;
margin:0px;
}
#cont{
width:100%;
height:50px;
line-height:50px;
}
input{
background-color: #4CAF50; /* Green */
width:80px;
height:30px;
border: none;
color: white;
padding: 5px 5px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
cursor:pointer;
}
/* 样式一 */
.styleOne{
background-color:#FF7F24;
width:300px;
height:400px;
border-radius:8px;
}
/* 样式二 */
.styleTwo{
background-color:#AFEABC;
width:400px;
height:500px;
border-radius:8px;
}
</style>
<script type="text/javascript">
function styleOne(){
document.getElementById("content").className="styleOne";
}
function styleTwo(){
document.getElementById("content").className="styleTwo"
}
</script>
</head>
<body>
<div id="cont">
<input type="button" value="样式一" id="btn1" onclick="styleOne()"/>
<input type="button" value="样式二" id="btn2" onclick="styleTwo()"/>
</div>
<div id="content"></div>
</body>
</html>