<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <link id="css1" rel="stylesheet" type="text/css" href="css1.css" /> <script type="text/javascript"> window.onload=function(){ var a=document.getElementById("a"); var b=document.getElementById("b"); a.onlock=function () { var c= document.getElementById("css1") c[href] = "css1.css" } b.onclick=function () { var d = document.getElementById("css1") d.href = "css2.css" } } </script> </head> <body> <input type="button" name="" id="a" value="红色" /> <input type="button" name="" id="b" value="蓝色"/> </body></html>
添加回答
举报
0/150
提交
取消