var account = {
http:'http://192.168.1.117:81',
toast:function(str){
if($("body").find('.toast').length>0){
$("body").find('.toast').hide()
$div=$("<div>"+str+"</div>");
$div.addClass("toast").css("color","#fff");
$("body").append($div);
$div.fadeOut(4000,function(){
$(this).hide()
});
}else{
$div=$("<div>"+str+"</div>");
$div.addClass("toast").css("color","#fff");
$("body").append($div);
$div.fadeOut(4000,function(){
$(this).hide()
});
}
},
order:function(){
var OrderNumber = $('.dingdan').val();
var state = $('.dinggou').val();
var brand = $('.pinpai').val();
var number = $('.shuliang').val();
var price = $('.jiage').val();
$.ajax({
url: './js/test.json',
type: 'post',
async: true,
dataType: 'json',
timeout: 10000,
data: {},
success:function(res){
$('.dingdan').html(res.OrderNumber)
$('.dinggou').html(res.state)
$('.pinpai').html(res.brand)
$('.shuliang').html(res.number)
$('.jiage').html(res.price)
}
})
}
}
account.order();
<div class="content-son">
<div class="content-grandson-one">
<span class="dingdan">订单编号(临时):898989323232</span>
<span class="dinggou">待订购</span>
</div>
<div class="content-grandson-two">
<div>
<span class="pinpai">品牌:代用名产品</span>
<span class="shuliang">数量:9.8吨</span>
</div>
<div>
<span class="riqi">数量:9.8吨</span>
</div>
</div>
<div class="content-grandson-three">
<span class="jiage">价格:¥72625.00</span>
</div>
</div>
CodeManDSH
相关分类