title: Rotating logo in html/javascript
body: <p>im trying to use html and javascript to create a rotating logo on my site.</p>
  
  <p>I want it to rotate on page load, and load them randomly. </p>
  
  <p>Ive tried SO MANY THINGS! that i found on google, and i cant seem to get it to work. Im trying to avoid using php to do it.</p>
  
  <p>i want to be able to have the random image in a tag like below, (if possible)</p>
  
  <pre><code>&lt;img src="" /&gt;
  </code></pre>
  
  <p>So, just to sum it up.</p>
  
  <p>I want to use "html" and "javascript" to create a script that everytime a page is refreshed, it loads a new logo from a directory on my server.</p>
  
  <p>EDIT: what i have tried</p>
  
  <pre><code>&lt;script type="javascript&gt;
      Array.prototype.random = function () { 
          return this[ parseInt( Math.random() * this.length )  ];
      }
  
      var myImage=[ 
          "logo1.png",
          "logo1.png",
          "logo1.png",
          "logo1.png"
      ].random()
  
      document.wite(myImage)
  &lt;/script&gt;
  </code></pre>