title: Dynamically change _target="blank" to _target="self" using JavaScript
body: <p>I've got a page with a fair few links, the links currently are target="blank" so if someone accidentally clicks on one they won't ruin what their doing on my page. However, I don't like doing _target="blank" (I always think it's sort of patronising for the user to tell them how to open a link..).</p>
  
  <p>So I thought I'd give the user the option to turn 'open in new window / tab' off. Currently I'm doing this in PHP:</p>
  
  <pre><code>&lt;?php if($newWindow){ echo '_blank'; } ?&gt;
  </code></pre>
  
  <p>But I would much rather do this in JavaScript if possible (seems silly to reload the whole page just to change a few strings). How would I do that? I've found lots on changing input fields and the like, but not link attributes..</p>
  
  <p>Oh, and not in jQuery if at all possible. If it is possible using CSS that would be cool, but I'm assuming it's not come quite that far yet..</p>