HTML page to add HTML code stitching string, and JS inside the decimal calculation

Source: Internet
Author: User

(1) var tr = "";


TR = ' <tr><td> bank transfer </td><td> ' +o_amount+ ' </td><td> ' +p_dt+ ' </td><td ></td><td></td><td></td><td> ' +p_hl_zh+ ' </td> <td> ' +p_u_zh+ ' & Lt;/td><td> ' +p_u_hm+ ' </td><td><a href= "javascript:void (0);" onclick= "DeleteCurrentRow ( This, ' +o_amount+ ') ' > Delete </a></td></tr> ';

$ ("#dataTR"). Append (tr);

(2) var img = "${applicationscope.rootpath}upload/payinput/" +imgs[i];
Images + = ' ";
var hh = ' <td id= ' ' +kk[1]+ ' "style=" position:relative; " > <a style=" Position:absolute; Margin-left: -20px; "href=" javascript:void (0) "title=" delete the picture "> </a> </td> ';

Decimal calculation: var total = parsefloat (total)-parsefloat (value);//And parseint


$ ("#total"). HTML (total.tofixed (2));//accurate to two decimal places

HTML page to add HTML code splicing string, and JS inside the decimal calculation

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.