Formatting amounts
var val= ' 212312.235423 ' var rex =/\d{1,3} (? = (\d{3}) +$)/g;val.replace (/^ (-?) (\d+) ((\.\d+)?) $/, function (s, s1, S2, S3) { return ' $ ' + S1 + s2.replace (Rex, ' $&, ') + S3;})
Create a form and submit it as post
$ (". Details"). Click (function () {var type=$ (this). attr ("type"); var financingamount=$ (this). attr ("Financingamount"); var url = "/supplieraccountcentercontroller/suppliereceivingadd"; First create a form form var tempform = document.createelement ("form"); Tempform.id= "TempForm1"; Tempform.method= "POST"; Tempform.action=url; Tempform.target= "_blank"; Create input tag to set the parameter var hideinput = document.createelement ("input"); Hideinput.type= "hidden"; Hideinput.name= "type"; Hideinput.value= type; Place the input form in the form form tempform.appendchild (hideinput); Add this form form to the body body of the page document.body.appendChild (tempform); Tempform.submit (); Document.body.removeChild (Tempform); }
$.ajaxsetup ({cache:false}); Set Ajax non-caching mechanism
determine if the IE browser JS code: (! +[1,]);
JS Practical Small Function collection