TOP /すぐに使えるJavaScript | スタイルシートを切り替える |
---|
<head> <link id="sheet"rel="stylesheet" type="text/css" href="001.css"> </head>
<body> <script type="text/javascript"><!-- function changecss(css){ document.getElementById("sheet").href = css; } //--></script> <form> <select name="select1"> <option value="001.css">blue</option> <option value="002.css">magenta</option> <option value="003.css">gray</option> </select> <input type="button" value="stylesheet" onClick="changecss(this.form.select1.value)"> </form> </body>