Jquery 他们正在使用条件$(此).val();是一个真实的表达式,如果值为空,则计算结果为false。感谢大家,我能够解锁我的程序。他们正在使用条件$(此).val();是一个真实的表达式,如果值为空,则计算结果为false。多亏了你们大家,我才能够解锁我的程序
Jquery 他们正在使用条件$(此).val();是一个真实的表达式,如果值为空,则计算结果为false。感谢大家,我能够解锁我的程序。他们正在使用条件$(此).val();是一个真实的表达式,如果值为空,则计算结果为false。多亏了你们大家,我才能够解锁我的程序 ,jquery,html-table,Jquery,Html Table,他们正在使用条件$(此).val();是一个真实的表达式,如果值为空,则计算结果为false。感谢大家,我能够解锁我的程序。他们正在使用条件$(此).val();是一个真实的表达式,如果值为空,则计算结果为false。多亏了你们大家,我才能够解锁我的程序 <table id="TableSelect"> <tbody> <tr> <th>name</th> <th>price</th> <th>qte
他们正在使用条件$(此).val();是一个真实的表达式,如果值为空,则计算结果为false。感谢大家,我能够解锁我的程序。他们正在使用条件$(此).val();是一个真实的表达式,如果值为空,则计算结果为false。多亏了你们大家,我才能够解锁我的程序
<table id="TableSelect">
<tbody>
<tr>
<th>name</th>
<th>price</th>
<th>qte</th>
</tr>
<tr>
<td class="tdQuantite"> Dell Latitude 7390</td>
<td><input type="text" size="5" data="qte" name="QUANTITE_300" value="" class="stock"> </td>
<td class="tdQuantite">61</td>
</tr>
<tr>
<td class="tdQuantite"> Dell Latitude 7490</td>
<td><input type="text" size="5" data="qte" name="QUANTITE_300" value="" class="stock"> </td>
<td class="tdQuantite">61</td>
</tr>
<tr>
<td class="tdQuantite"> Dell Latitude 5590</td>
<td><input type="text" size="5" data="qte" name="QUANTITE_300" value="" class="stock"> </td>
<td class="tdQuantite">61</td>
</tr>
<tbody>
</table>
var Qte = $('#TableSelect tr:not(:first-child) td input').filter(function(){
return $(this).val();
}) ;
console.log(Qte);
var Qte = []
$('#TableSelect tr').each(function(){
if($('td input', this).val()){
Qte.push([$('td:first-child', this).text(), $('input', this).val()]
}
})
console.log(Qte);
var Qte = $('#TableSelect tr:not(:first-child)')
.filter(function(i, element){
var cell1 = element.childNodes[0].value;
var cell2 = element.childNodes[1].value;
return $(this).val();
});
//outside the function
var values = [];
//from inside the function
var textAndValueArray = [cell1, cell2];
values.push(textAndValueArray);
return;