title: Add border to images
body: <p>I'm totally new to JS. I'm trying to make me a bookmarklet that finds all images on a web page and adds a colorful border to them. Then, by clicking on an image I'd like to attach the image path.
  This is what I've got so far:</p>
  
  <pre><code>javascript:
  for (var i= document.links.length; i--&gt;0;) {
      if (document.links[i].getElementsByTagName('img').length!=0) {
          document.links[i].onclick= function() {
             window.open("http://www.example.com/whatever?imgsrc=" + this.src + "");
          };
      }
  }
  </code></pre>
  
  <p>How can I add a border to the images? </p>
  
  <p>Thanks,
  Bob</p>