JavaScript网页换肤

使网页背景颜色可选黄/粉

<!doctype html>
<html>
<head><title>网页换肤</title></head>
<link id="css1" href="5-1.css" type="text/css" rel="stylesheet"> <script>
function ys1(){
var a=document.getElementById("css1");
a.href="5-1.css";
}
function ys2(){
var a=document.getElementById("css1");
a.href="5-2.css";
}
</script>
<body>
<button onclick="ys1();">样式1</button>
<button onclick="ys2();">样式2</button>
</body>
</html>

JavaScript网页换肤JavaScript网页换肤

上一篇:【Oracle学习笔记】索引


下一篇:jdk8 新特性stream().map()