JQuery返回日期值更改
我的输出是:JQuery返回日期值更改,jquery,Jquery,我的输出是: $.post('includes/api_orderupdate.php', { getupate:1, ship:id, country:country, state:state, subtotal:subtotal }, function(data){ var updateval=data.split('~~'); $('#ship_info').text(updateval[0].trim()); var taxdet=upda
$.post('includes/api_orderupdate.php', { getupate:1, ship:id, country:country, state:state, subtotal:subtotal },
function(data){
var updateval=data.split('~~');
$('#ship_info').text(updateval[0].trim());
var taxdet=updateval[1];
alert(taxdet);
});
如何获得此值,仅如增值税:237.5,附加税:220
我不知道如何得到这个值。提前感谢。如果我理解正确,您希望检索每个
输入
元素的值
属性:
<input type='hidden' class='taxinfo' value='VAT:237.5'><input type='hidden' class='taxinfo' value='supertax:220'>
您可以始终
map
$('input').each(function() {
alert($(this).val());
})
它不就是.val()
?
var values = $('input').map(function(){
return this.value;
}).get().join(', ');
console.log(values); // VAT:237.5, supertax:220