title: How do I set value to input type text with dynamic id, using jQuery?
body: <p>I have div element with dynamic id for input type text.</p>
  
  <p>this is my html code.</p>
  
  <pre><code>&lt;?php 
  for($j=0;$j&lt;=3;$j++){
  ?&gt;
   &lt;input type="text" id="money&lt;?php echo $j; ?&gt;"/&gt;
  &lt;?php
  }
  ?&gt;
  </code></pre>
  
  <p>And this is my script. I try with this code but its not work, and the value is still empty.</p>
  
  <pre><code>$("#money1").val("200");
  </code></pre>
  
  <p>I try with this code and its working, but it affect all of the input type text with 'money' id.</p>
  
  <pre><code>$('input[id^="money"]').val("200");
  </code></pre>
  
  <p>please help me, I'm already stuck.</p>
  
  <p>Thank you for your attention.</p>