时间:2021-07-01 10:21:17 帮助过:39人阅读
简单的换肤
蓝 红 绿
<!DOCTYPE html><html>
<head>
<meta charset="UTF-8">
<title></title>
<script>
function changeColor(str){
var body = document.getElementById("b");
body.style.backgroundColor = str;
} </script>
</head>
<body id="b" >
<button onclick="changeColor('blue')">蓝色</button>
<button onclick="changeColor('red')">红色</button>
<button onclick="changeColor('green')">绿色</button>
</body></html>以上就是如何实现网页换肤效果 的详细内容,更多请关注Gxl网其它相关文章!