fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <link id="style1" rel="stylesheet" type="text/css" href="style1.css"> <script> function displayResult(){ document.getElementById("style1").href="style2.css"; } </script> </head> <body> <h1>我的网站主页</h1> <button type="button" onclick="displayResult()">切换样式表</button> </body> </html>
运行结果