title: How to call javascript function in <src>?
body: <p>I need to know how to call javascript functions in "src" also for    </p>
  
  <pre><code>&lt;input type=text&gt;
  </code></pre>
  
  <p>I am using a function which returns querystring parameters</p>
  
  <pre><code>function GetUrlValue(VarSearch) {
              var SearchString = window.location.search.substring(1);
              var VariableArray = SearchString.split('&amp;');
              for (var i = 0; i &lt; VariableArray.length; i++) {
                  var KeyValuePair = VariableArray[i].split('=');
                  if (KeyValuePair[0] == VarSearch) {
                      return KeyValuePair[1];
                  }
              }
          }
  </code></pre>
  
  <p>like if:</p>
  
  <blockquote>
    <p>"www.testweb.com?a=521&amp;b=<a href="http://demo.sacredpixel.com/redsky/wp/modern/wp-content/uploads/2013/05/gd-1.jpg" rel="nofollow">http://demo.sacredpixel.com/redsky/wp/modern/wp-content/uploads/2013/05/gd-1.jpg</a>"</p>
  </blockquote>
  
  <p>so it will return on</p>
  
  <p><code>alert(GetUrlValue('a'));</code> ===> 521</p>
  
  <p>but what i need is to call this function in img and input type 'text'
   tags.. like:</p>
  
  <pre><code>&lt;iframe src="" id="well" width="100%" height="100%" /&gt;
  &lt;input type="text" value="" /&gt;
  </code></pre>
  
  <p>How to call function in above two?</p>