title: javascript - get domain ONLY from document.referrer
body: <p>I would like to get ONLY the domain from the referrer urls. The referrer urls I mostly get are <code>http://www.davidj.com/pages/flyer.asp</code> &amp; <code>http://www.ronniej.com/linkdes.com/?adv=267&amp;loc=897</code> </p>
  
  <p>Whenver I get referrer urls like the above, I just want to get the domain example: <a href="http://www.davidj.com">http://www.davidj.com</a></p>
  
  <p>I have tried using the .split method but i am having trouble using it.</p>