How to get value of text box inside of table using jquery?
<p>I have problems with this code:
I can't get the value of textbox there:</p>

<p>here's my codes:</p>

<pre><code>$(document).ready(function () {
    $('#btnsave').click(function () {
        //saveData();
        // for looping the tr id:
        $("tr#mytr", "#mytable").each(function () {

            // how to get value of pos_x in every tr??

        });
    })
});
</code></pre>

<hr>

<p>and here is the html</p>

<pre><code>&lt;table style="width:100%" id="mytable"&gt;
   &lt;tr id="mytr"&gt;
    &lt;td&gt;
     X position:
    &lt;/td&gt;
    &lt;td&gt;
     &lt;input id="xPositionField" name="pos_x"   style="width:100%"/&gt;
     &lt;input id="yPositionField" name="pos_y"  style="width:100%"/&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr id="mytr"&gt;
    &lt;td&gt;
     Y position:
    &lt;/td&gt;
    &lt;td&gt;
     &lt;input id="xPositionField" name="pos_x"   style="width:100%"/&gt;
     &lt;input id="yPositionField" name="pos_y"   style="width:100%"/&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr id="mytr"&gt;
    &lt;td&gt;
     Width:
    &lt;/td&gt;
    &lt;td&gt;
     &lt;input id="xPositionField" name="pos_x"   style="width:100%"/&gt;
     &lt;input id="yPositionField" name="pos_y"   style="width:100%"/&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr id="mytr"&gt;
    &lt;td&gt;
     Height:
    &lt;/td&gt;
    &lt;td&gt;
     &lt;input id="xPositionField" name="pos_x"   style="width:100%"/&gt;
     &lt;input id="yPositionField" name="pos_y"   style="width:100%"/&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr id="mytr"&gt;
    &lt;td&gt;
     Last save date:
    &lt;/td&gt;
    &lt;td&gt;
     &lt;input id="xPositionField" name="pos_x"   style="width:100%"/&gt;
     &lt;input id="yPositionField" name="pos_y"   style="width:100%"/&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td colspan="2"&gt;
     &lt;input type="button"  name="btnsave" value="Save" id="btnsave" &gt;
    &lt;/td&gt;
   &lt;/tr&gt;
  &lt;/table&gt;
</code></pre>

<p>in this code, i use same id of tr and some id of every textbox...</p>
