title: Main difference between window.location.href and window.onload() in javascript?
body: <p>I'm using <code>window.location.href</code> to load a page and now I have switched over to <code>window.onload()</code> function, but the page does not load some contents. </p>
  
  <p><code>window.location.href = $(this).val();</code> is the code I'm using.</p>
  
  <p>How can I write it using <code>window.onload()</code> function?</p>