change按钮

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>单击change按钮</title>
<style type="text/css">
div{
text-shadow:2px 2px #ff0000;
font-family:'黑体';
font-size:30px;
text-align: center;
}
button{

}
.change{

font-size: 20px;
}
.change:hover{
border: 3px solid seagreen;
}
</style>
</head>
<body>
<div id="null">
<p>哪里会有人喜欢孤独,不过是不喜欢失望罢了!</p>
</div>
<button class="change" onclick="myFunction()">change</button>
<script type="text/javascript">
function myFunction(){
var Color = document.getElementById("null");
Color.style.border = "4px double red";

}
</script>
</body>
</html>

猜你喜欢

转载自www.cnblogs.com/shu-xi/p/11695702.html