码迷,mamicode.com
首页 > 移动开发 > 详细

js中动态加载---append

时间:2016-11-18 22:24:39      阅读:332      评论:0      收藏:0      [点我收藏+]

标签:ddl   slice   href   保险   span   idt   取消   orm   continue   

$(‘#Order_information‘).append(‘
<div class="single_product">
<div class="Cancel">
<a href="javascript:void(0);" onclick="continuePay(‘+orderno+‘,‘+useId+‘);">继续支付</a>
<a href="javascript:void(0);" onclick="cancelOrder(‘+orderno+‘,‘+useId+‘);">取消订单</a>
</div>
<ul class="Top_mation">
<li>订单编号: <span class="indent_number">‘+data[i].baseinfor.orderno+‘</span></li>
<li class="right">状态: <span class="mode">‘+orderstate+‘</span></li>
</ul>
<div class="Middle_mation" onclick="showOrderDetail(‘+orderno+‘,‘+useId+‘);">
<a href="javascript:void(0);"><img src="‘+urlpath+‘/views/quicksure/imags/car.png"></a>
<ul>
<li><h3>汽车保险</h3></li>
<li>车牌号: <span class="Car_number">‘+data[i].vhlinfor.lcnno+‘</span></li>
<li>
商业险起期:<span class="begin_date">‘+data[i].baseinfor.sypolicystartdate+‘</span>&nbsp;&nbsp;&nbsp;&nbsp;
交强险起期:<span class="begin_date">‘+data[i].baseinfor.jqpolicystartdate+‘</span>
</li>
<li>
商业险止期:<span class="end_date">‘+data[i].baseinfor.sypolicyenddate+‘</span>&nbsp;&nbsp;&nbsp;&nbsp;
交强险止期:<span class="end_date">‘+data[i].baseinfor.jqpolicyenddate+‘</span>
</li>
</ul>
<b>〉</b>
</div>
<p>金额: <span class="money">‘+data[i].baseinfor.totalPremium+‘</span></p>
</div>‘);

 

 

function addPolicyInfo(insuranceDetailsVO,orderstate){
var orderno="‘"+insuranceDetailsVO.baseinfor.orderno+"‘";
var useId="‘"+insuranceDetailsVO.baseinfor.userinforid+"‘";
var order_info = $(‘#Order_information‘);
var sp_div = $(‘<div class="single_product"/>‘);
sp_div.append($(‘<ul class="Top_mation"/>‘).append(‘<li class="left">订单编号: <span class="indent_number">‘+insuranceDetailsVO.baseinfor.orderno+‘</span></li class="right"><li class="right">状态: <span class="mode">‘+orderstate+‘</span></li>‘));
var mm_div = $(‘<div class="Middle_mation" onclick="showOrderDetail(‘+orderno+‘,‘+useId+‘);"/>‘);
mm_div.append(‘<a href="#"><img src="‘+urlpath+‘/views/quicksure/imags/carLogo.jpg" style="width:110px;height:98px;"/>‘);
var sp_ul = $(‘<ul/>‘).append(‘<li>车牌号: <span class="Car_number">‘+insuranceDetailsVO.vhlinfor.lcnno+‘</span>&nbsp;&nbsp;车主:<span>‘+insuranceDetailsVO.vhlinfor.drvowner+‘</span></li>‘);
if(insuranceDetailsVO.baseinfor.sypolicystartdate != null){
sp_ul.append($(‘<li>商业险起期:<span class="begin_date">‘+insuranceDetailsVO.baseinfor.sypolicystartdate.slice(0,11)+‘</span></li>‘));
}
if(insuranceDetailsVO.baseinfor.sypolicyenddate != null){
sp_ul.append($(‘<li>商业险止期:<span class="end_date">‘+insuranceDetailsVO.baseinfor.sypolicyenddate.slice(0,11)+‘</span></li>‘));
}
if(insuranceDetailsVO.baseinfor.jqpolicystartdate != null){
sp_ul.append($(‘<li>交强险起期:<span class="begin_date">‘+insuranceDetailsVO.baseinfor.jqpolicystartdate.slice(0,11)+‘</span></li>‘));
}
if(insuranceDetailsVO.baseinfor.jqpolicyenddate != null){
sp_ul.append($(‘<li>交强险止期:<span class="end_date">‘+insuranceDetailsVO.baseinfor.jqpolicyenddate.slice(0,11)+‘</span></li>‘));
}
mm_div.append(sp_ul).append(‘<b>〉</b>‘);
sp_div.append(mm_div);
var p = $(‘<p/>‘);
if(insuranceDetailsVO.baseinfor.orderstate==30||insuranceDetailsVO.baseinfor.orderstate==40){
p.append(‘<a href="#" onclick="continuePay(‘+orderno+‘,‘+useId+‘);">继续支付</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="cancelOrder(‘+orderno+‘,‘+useId+‘);">取消订单</a>&nbsp;&nbsp;&nbsp;&nbsp;‘);
}
if(insuranceDetailsVO.baseinfor.orderstate==10||insuranceDetailsVO.baseinfor.orderstate==20){
p.append(‘<a href="#" onclick="continueInsure(‘+orderno+‘,‘+useId+‘);">继续投保</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="cancelOrder(‘+orderno+‘,‘+useId+‘);">取消订单</a>&nbsp;&nbsp;&nbsp;&nbsp;‘);
}
p.append(‘金额: <span class="money">‘+insuranceDetailsVO.baseinfor.totalPremium+‘</span>‘);
sp_div.append(p);
order_info.append(sp_div);
}

js中动态加载---append

标签:ddl   slice   href   保险   span   idt   取消   orm   continue   

原文地址:http://www.cnblogs.com/ldbangel/p/6078715.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!