title: How to use wildcard for document.getElementsByName?
body: <p>I am trying to do a very simple thing that is filling an input box using javascript bookmarklet in Firefox.</p>
  
  <p>Here is the snippet of related code and screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/YTT40.png" alt=""></p>
  
  <pre><code>&lt;input id="T22401715851381308556344_j_id_id0:freeSMSBean:receiverNumber" class="text" type="text" style="POSITION: absolute;" onblur="validateReceiverNumber(this,'');" maxlength="10" value="" name="T22401715851381308556344_j_id_id0:freeSMSBean:receiverNumber"&gt;&lt;/input&gt;
  </code></pre>
  
  <p>I can fill in the value using the following javascript bookmarklet:</p>
  
  <pre><code>javascript:{document.getElementsByName('T22401715851381308556344_j_id_id0:freeSMSBean:receiverNumber')[0].value='1234';void(0)}
  </code></pre>
  
  <p>However the problem is that the <strong>bold</strong> part of name keeps changing.
  <strong>T22401715851381308556344_j_id_id0</strong>:freeSMSBean:receiverNumber</p>
  
  <p>I would like to know can I somehow match the changing part using a wildcard. or is there a better solution for filling in this input box?</p>
  
  <p>Thanks</p>