itty bitty Javascript CSS randomizer

Although I don’t know Maruah, I have to thank him/her for the itty bitty Javascript CSS randomizer in my Journal. There’s nothing to it! Reload this page to understand what I’m talking about.

<script language="javascript">
<!--
var WhatCSS=Math.round(Math.random()*1);
var TheCSS=new Array(2);
TheCSS[0]="journal.css";
TheCSS[1]="journal2.css";
document.write('<link rel="stylesheet" type="text/css" href="' + TheCSS[WhatCSS] + '">') ;
-->
</script>

And thank you to BrownPau for the CSS toggler… who got it from A List Apart.

I finished reading In Code but I’ll likely be re-reading it for a while to get all the number-theory goodness I can out of it. I’ve started playing piano… well, sort of. It’ll be a while before I’m a virtuoso.

One Comment

  1. Dmitry says:

    Thank you for your solution. The fact that I have long sought, but did not know how to do.

Leave a Comment

Do not write "http://" or "https://" in your comment, it will be blocked. It may take a few days for me to manually approve your first comment.