title: Random slogan generator with using javascript's switch
body: <p>I have got little problem. I'm learning javascript and I wanted to create random slogan generator for my site with using <code>switch</code>.</p>
  
  <p>So I created this html code</p>
  
  <pre><code>&lt;body onload="rndqu()"&gt;
      &lt;div id="head"&gt; &lt;a href="index.html"&gt;Mira's place&lt;a&gt;&lt;br&gt;
              &lt;h2&gt;&amp;#8220;&lt;span id="quote"&gt;&lt;/span&gt;&amp;#8221;&lt;/h2&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>and used this Javascript</p>
  
  <pre><code>var qu;
  var slogan;
  function rndqu(n){
      var random = function(min, max) {
      return Math.floor(Math.random() * (max - min + 1)) + min;
      };  
      qu = random(1, 3);
  }
  switch(qu){
      case 1:
          slogan = "Here is the 1";
          break;
      case 2:
          slogan = "Here is the 2";
          break;
      case 3:
          slogan = "Woah";
          break;
      default:
          slogan = "Really?";
  }
  document.getElementById("quote").innerHTML = slogan;
  </code></pre>
  
  <p>I don't get it why it doesn't work. Can someone help me? Thank you! And here is jsfiddle of it <a href="http://jsfiddle.net/NX3cz/" rel="nofollow">http://jsfiddle.net/NX3cz/</a></p>