Dynamic Loading---Append in js

Source: Internet
Author: User

$ (' #Order_information '). Append ('
<div class= "Single_product" >
<div class= "Cancel" >
<a href= "javascript:void (0);" onclick= "Continuepay (' +orderno+ ', ' +useid+ ');" > Continue to pay </a>
<a href= "javascript:void (0);" onclick= "Cancelorder (' +orderno+ ', ' +useid+ ');" > Cancel Orders </a>
</div>
<ul class= "Top_mation" >
<li> Order Number: <span class= "Indent_number" > ' +data[i].baseinfor.orderno+ ' </span></li>
<li class= "Right" > Status: <span class= "mode" > ' +orderstate+ ' </span></li>
</ul>
<div class= "middle_mation" onclick= "Showorderdetail (' +orderno+ ', ' +useid+ ');" >
<a href= "javascript:void (0);" ></a>
<ul>
<li><li> License plate number: <span class= "Car_number" > ' +data[i].vhlinfor.lcnno+ ' </span></li>
<li>
Business Insurance Starting period: <span class= "begin_date" > ' +data[i].baseinfor.sypolicystartdate+ ' </span>&nbsp;&nbsp; &nbsp;&nbsp;
Cross-strong insurance starting period: <span class= "begin_date" > ' +data[i].baseinfor.jqpolicystartdate+ ' </span>
</li>
<li>
Business Insurance Stop: <span class= "end_date" > ' +data[i].baseinfor.sypolicyenddate+ ' </span>&nbsp;&nbsp;& nbsp;&nbsp;
Cross-strong insurance stop: <span class= "end_date" > ' +data[i].baseinfor.jqpolicyenddate+ ' </span>
</li>
</ul>
<b>〉</b>
</div>
<p> Amount: <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 ' > order code: <span class= "Indent_ Number "> ' +insurancedetailsvo.baseinfor.orderno+ ' </span></li class=" right "><li class=" right " > Status: <span class= "mode" > ' +orderstate+ ' </span></li> '));
var mm_div = $ (' <div class= "middle_mation" onclick= "Showorderdetail (' +orderno+ ', ' +useid+ ');" /> ');
Mm_div.append (' <a href= ' # "> ');
var Sp_ul = $ (' <ul/> '). Append (' <li> license plate number: <span class= "Car_number" > ' + insurancedetailsvo.vhlinfor.lcnno+ ' </span>&nbsp;&nbsp; owner:<span> ' + insurancedetailsvo.vhlinfor.drvowner+ ' </span></li> ');
if (insuranceDetailsVO.baseinfor.sypolicystartdate! = null) {
Sp_ul.append ($ (' <li> Business Insurance Start: <span class= "Begin_date" > "+ InsuranceDetailsVO.baseinfor.sypolicystartdate.slice (0,11) + ' </span></li> ');
}
if (insuranceDetailsVO.baseinfor.sypolicyenddate! = null) {
Sp_ul.append ($ (' <li> Business Insurance Stop: <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+ '); " > Continue to pay </a>&nbsp;&nbsp;&nbsp;&nbsp;<a href= "#" onclick= "Cancelorder (' +orderno+ ', ' + Useid+ '); " > Cancel Orders </a>&nbsp;&nbsp;&nbsp;&nbsp; ');
}
if (insurancedetailsvo.baseinfor.orderstate==10| | INSURANCEDETAILSVO.BASEINFOR.ORDERSTATE==20) {
P.append (' <a href= ' # "onclick=" Continueinsure (' +orderno+ ', ' +useid+ '); " > Continue to insure </a>&nbsp;&nbsp;&nbsp;&nbsp;<a href= "#" onclick= "Cancelorder (' +orderno+ ', ' + Useid+ '); " > Cancel Orders </a>&nbsp;&nbsp;&nbsp;&nbsp; ');
}
P.append (' Amount: <span class= ' money ' > ' +insurancedetailsvo.baseinfor.totalpremium+ ' </span> ');
Sp_div.append (P);
Order_info.append (SP_DIV);
}

Dynamic Loading---Append in js

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.