title: JavaScript change img src attribute without jQuery
body: <p>How to change the <code>src</code> attribute of a <code>HTMLImageElement</code> in JavaScript?</p>
  
  <p>I need help to convert <code>logo.attr('src','img/rm2.png')</code> to vanilla JavaScript.</p>
  
  <pre><code>window.onresize = window.onload = function () {
      if (window.innerWidth &gt; 1536) {
          var logo = document.getElementById('rm');
          logo.attr('src','img/rm2.png');
      }
  };
  </code></pre>