var newForm = $("#componentForm").clone().removeAttr("style").attr("id","componentForm"+count);
var newFormHtml = newForm.html().replace(/componentPrice\[0\]/g,"componentPrice["+count+"]");
newFormHtml = newFormHtml.replace(/componentPriceMoney0/g,"componentPriceMoney"+count);
newFormHtml = newFormHtml.replace(/total0/g,"total"+count);
newFormHtml = newFormHtml.replace(/0/g,count);
newFormHtml = newFormHtml.replace(/材料费\(1\)/g,"维修费("+(labelCount+1)+")");
newForm.html(newFormHtml);
newForm.find(".del").show();
newForm.find('#price_label').text('费用');
newForm.find('#price_label').next().children('.money').attr('placeholder', '请输入维修费用');
newForm.find('.price-type').val('维修费');
$("#componentFormDiv").append(newForm);
$("#componentPriceMoney"+count).parent().find("span").html("");
$("#total"+count).html("");
count++;
labelCount++;
js表单克隆
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
输入框填写提示
$(document).ready(function() { $("#titlename").focus(function(){ if($(this).val() == this
如是我闻hjy
2020-06-22 16:38:38
js一对多,添加属性
<tr> <td height="24" class="bline"> <table width="900" border="0" cellspacing="0" cellpaddi
如是我闻hjy
2020-06-22 16:38:38
jQuery在父页面得到<iframe>引用子…
"jquery-1.3.1.js" type="text/javascript"> "text/javascript"> //查找匹配元素內部所有的子節點(包括文本節點),如果元素是一個if
寂寞烟
2020-06-16 02:40:27
jquery Ajax
寂寞烟
2020-06-16 02:40:27
页面中文传值,出现乱码
坏孩子zj
2020-02-26 05:28:33
js 打开本地或共享文件夹
坏孩子zj
2020-02-26 05:28:33
扩展jQuery的功能限制只能输入数字
tangkenyi
2020-02-25 23:22:16
js 不能直接将 console.log 作为参数使用
tangkenyi
2020-02-25 23:22:16
EasyUI combobox 使用
tangkenyi
2020-02-25 23:22:16
前端打包构建工具gulp入门实战
IT小君
2020-02-25 10:07:19
关于Javascript setTimeout中的this问题,以及倒计时器的实现源码
IT小君
2020-02-25 10:07:09
整理好的省市区json数据
IT小君
2020-02-25 10:07:08