I have a style changer and I want it so when someone selects the color they want, it stays saved.
HTML Code:
And the dropdown box with the different colors:HTML Code:<script type="text/javascript"> function changeStyle(href){ if(href){ document.getElementById("style-reset").href = "layout/css/reset.css"; document.getElementById("style").href = "style.css"; document.getElementById("style-variation").href = href; } else{ alert("No stylesheet entered."); } } </script>
HTML Code:
__________________HTML Code:<li><a href="#" onclick="changeStyle('layout/css/style1.css');">Blue</a></li> <li><a href="#" onclick="changeStyle('layout/css/style2.css');">Black</a></li> <li><a href="#" onclick="changeStyle('layout/css/style3.css');">Green</a></li> <li><a href="#" onclick="changeStyle('layout/css/style4.css');">Purple</a></li> <li><a href="#" onclick="changeStyle('layout/css/style5.css');">Red</a></li> <li><a href="#" onclick="changeStyle('layout/css/style6.css');">Olive</a></li>



Reply With Quote

Bookmarks