title: How to change link HREFs via javascript
body: <p>I have a form where the user inputs an URL. The value resulting from that input after tweaking it a bit is the variable #url which is displayed to the user right away.</p>
  
  <p>I need to make the like and tweet buttons in my site point to that URL. Making their HREFS equal to the variable #url</p>
  
  <p>This are the share buttons:</p>
  
  <pre><code>&lt;a id="twtbutton" href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="theclocktwt"&gt;Tweet&lt;/a&gt;&lt;script type="text/javascript" src="http://platform.twitter.com/widgets.js"&gt;&lt;/script&gt;&lt;/div&gt;
  
  &lt;fb:like id="fbbutton" send="false" layout="button_count" width="450" show_faces="false" font="" style="position: absolute; left:110px;"&gt;&lt;/fb:like&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here you can see how it works: <a href="http://www.chusmix.com/tests/magic.html" rel="noreferrer">http://www.chusmix.com/tests/magic.html</a></p>
  
  <p>What appears as "Improved link" is the url I want the share buttons to use.</p>