Posted By

rwczippy on 01/26/09


Tagged

css javascript html style howto tutorial switcher


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

rwczippy
silverskymedia
thinkcirca
snoopmole


Simple Tutorial to Swap CSS Files for HTML Web Pages


 / Published in: HTML
 

URL: http://www.centerkey.com/style/switcher/

NICE!

  1. <html><head><title>Style Switcher</title>
  2. var StyleFile = "style" + document.cookie.charAt(6) + ".css";
  3. document.writeln('<link rel="stylesheet" type="text/css" href="' + StyleFile + '">');
  4. </head><body><h2>Live in Style</h2><br>
  5. <a href="javascript: document.cookie='style='; window.location.reload();">Style 1</a> |
  6. <a href="javascript: document.cookie='style=2'; window.location.reload();">Style 2</a> |
  7. <a href="javascript: document.cookie='style=3'; window.location.reload();">Style 3</a>
  8. </body></html>

Report this snippet  

You need to login to post a comment.