js拼接字符串,动态id

var str = '';
            str += '<tr style="vertical-align: middle !important;text-align: center;" id="'+hanghao+'">';
            str += '<td class="width-5 active"><input type="checkbox" value="1"/></td>';
            str += '<td class="width-15 active"><input type="text" id="fpxmIn'+hanghao+'" name="fpxm'+hanghao+'" class="form-control required" value=""  οnclick="showDiv('+hanghao+')" AUTOCOMPLETE="off"/><div id="fpxmB'+hanghao+'" style="display: none;"><div tabindex="0" οnfοcus="test()" hidefocus="true" οnblur="moveout1('+hanghao+')" style="max-height: 150px;max-width: 150px;font-size:10px;overflow: scroll;position: absolute;border:1px; solid #ccc;outline=0;" id="fpxmD'+hanghao+'"></div></div></td>';
            str += '<td class="width-15 active"><input type="text" id="bxxmIn'+hanghao+'" name="bxxm'+hanghao+'" class="form-control required" value="" οnchange="getysyeandspr('+hanghao+')" οnclick="showDiv2('+hanghao+')"   AUTOCOMPLETE="off"/><div id="bxxmB'+hanghao+'"  tabindex="0"  οnblur="moveout2('+hanghao+')" style="display: none;"><div style="max-height: 150px;max-width: 150px;font-size:10px;overflow: scroll;position: absolute;" id="bxxmD'+hanghao+'"></div></div></td>';
            str += '<td class="width-15 active"><input type="text" id="cdbmIn'+hanghao+'" name="cdbm'+hanghao+'" class="form-control required" value=""  οnchange="getysyeandspr('+hanghao+')" οnclick="showDiv3('+hanghao+')"  AUTOCOMPLETE="off"/><input type="hidden" id="cdbmidIn'+hanghao+'" name="cdbmid'+hanghao+'" /><div id="cdbmB'+hanghao+'" tabindex="0"  οnblur="moveout3('+hanghao+')" style="display: none;"><div style="max-height: 150px;max-width: 150px;font-size:10px;overflow: scroll;position: absolute;" id="cdbmD'+hanghao+'" ></div></div></td>';
            str += '<td class="width-15 active"><input type="text" id="xm'+hanghao+'" name="xm'+hanghao+'" class="form-control" value="" /><div id="xm'+hanghao+'" style="display: none;"><div style="max-height: 100px;overflow: scroll;position: absolute;" id="xm'+hanghao+'"></div></div></td>';
            str += '<td class="width-15 active"><input type="text" id="ysye'+hanghao+'" style="border-style:none" readonly=readonly  name="ysye'+hanghao+'" value="" class="form-control"/></td>';
            str += '<td class="width-15 active"><input type="text" id="je'+hanghao+'" name="je'+hanghao+'" min="0" class="form-control required"/></td>';
            str += '<td class="width-15 active"><input type="text" id="zy'+hanghao+'" name="zy'+hanghao+'" class="form-control required"/></td>';
           
            str += '</tr>';
            $("#fybxtbodyid").append(str);    

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值