How to remove value has been exist in list table tr?
<p>I have a sample code:</p>

<pre><code>&lt;table id="modem_list"&gt;
   &lt;tr class="input_1" name="modem"&gt;
      &lt;td&gt;iPad 1&lt;input type="hidden" value="1" class="output_1"&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="input_2" name="modem"&gt;
      &lt;td&gt;iPad 2&lt;input type="hidden" value="2" class="output_2"&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class="input_1" name="modem"&gt;
      &lt;td&gt;iPad 1&lt;input type="hidden" value="1" class="output_1"&gt;&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;

&lt;input type="button" class="submit" onclick="update()" value="submit" /&gt;
</code></pre>

<p>and javascript</p>

<pre><code>function update() {
  var table = document.getElementById("modem_list");
var rowCount = table.rows.length;
for(var i=0; i&lt;rowCount-1; i++) {
    for(var j=i+1; j&lt;rowCount; j++) {
        if(table.rows[i] == table.rows[j]) {
            rowCount--;
            for(var k=j; k&lt;rowCount; k++) {
                table.rows[k] = table.rows[k+1];
                table.deleteRow(k);
                k--;
            }
        }
    }
}
}
</code></pre>

<p>How to fix result is:</p>

<pre><code>&lt;table id="modem_list"&gt;
       &lt;tr class="input_1" name="modem"&gt;
          &lt;td&gt;iPad 1&lt;input type="hidden" value="1" class="output_1"&gt;&lt;/td&gt;
       &lt;/tr&gt;
       &lt;tr class="input_2" name="modem"&gt;
          &lt;td&gt;iPad 2&lt;input type="hidden" value="2" class="output_2"&gt;&lt;/td&gt;
       &lt;/tr&gt;
    &lt;/table&gt;
</code></pre>
