i'm pretty new css , javascript , wondering if make script allows change stylesheet site uses.
say: had green theme shades of green. user can change red press of button?
has idea how this?
you can set id link tag , switch css @ runtime.
html
<link type="text/css" rel="stylesheet" media="all" href="../green.css" id="theme_css" />
js
document.getelementbyid('buttonid').onclick = function () { document.getelementbyid('theme_css').href = '../red.css'; };
Comments
Post a Comment