title: Multiple javascript window.onload solution
body: <p>Before i ask this question, i never post about questions like this but I don't understand how to implement it  in my code. i have code like this</p>
  
  <pre><code>window.onload = function() {
   var url  = getQueryVariable("url");
   document.getElementById('view').src = url;
  }
  window.onload = function() {
      var linkDirect = document.getElementsByClassName("frame");
      for (var i = 0; i &lt; linkDirect.length; i++) {
          linkDirect[i].href = "http://namablog.blogspot.com/p/demo.html?url=" + linkDirect[i].href
      }
  }
  </code></pre>
  
  <p>then, how can I make the code execution using only one window.onload</p>