title: How to select specific form element in jQuery?
body: <p>I have two form like this:</p>
  
  <pre><code>&lt;form id='form1' name='form1'&gt;
    &lt;input name='name' id='name'&gt;
    &lt;input name='name2' id='name2'&gt;
  &lt;/form&gt;
  
  &lt;form id='form2' name='form2'&gt;
    &lt;input name='name' id='name'&gt;
    &lt;input name='name2' id='name2'&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Now I want to insert text in <strong>name</strong> field of <strong>form2</strong>. I am using <a href="http://jsfiddle.net/BNXuw/" rel="noreferrer">following jQuery code</a> but it fill <strong>name</strong> field of <strong>form1</strong>.</p>
  
  <pre><code>$("#name").val('Hello World!');
  </code></pre>
  
  <p>So how to select specific form elements only?</p>