フォームがあり、その中にテーブルがあります。私は次のようなことをしています
function validate(){
var result = true;
$("tr").each(function(){
if($(this).find(".qty").val()<1||isNaN($(this).find(".qty").val())){
result = false;
return false;
}
if($(this).find(".pvDetails").text()==""){
result = false;
return false;
}
});
if(result)
return true;
else
alert('correct the input values | check your ID or Qty field');
return false;
}
しかし、私のヘッダーは以下のように定義されているので、これは検証のために私のヘッダーも取ります-
<tr height="50px" bgcolor="#EEE8CD">
<th align="left" width="10%">Serial No.</th>
<th align="left" width="15%">Variant ID</th>
<th align="left" width="20%">Product Detail</th>
<th align="left" width="17%">Product Image</th>
<th align="left" width="10%">B2B Price</th>
<th align="left" width="13%">Quantity</th>
<th align="left" width="12%">Total</th>
</tr>
残りは私のテーブル本体です。
私が取っているのと同じアプローチを使用しながら、テーブルヘッダーの検証をスキップするにはどうすればよいですか。