function addspefile(){
var temp="<tr class=\"spefile spefile#\">";
temp+= "<th align=\"right\" valign=\"top\">其他特殊许可证: </th>";
temp+=" <td align=\"left\" valign=\"top\">";
temp+=" <div class=\"supplier_filebox\">";
temp+= "<input class=\"inp_btn\" type=\"button\" name=\"\" value=\"选择文件\" />";
temp+= " <input class=\"inp_txt\" type=\"text\" name=\"\" value=\"未选择文件\" readonly=\"readonly\" />";
temp+= "<input type=\"file\" class=\"zcinput inp_file label\" info=\"图片格式jpg,gif,png,jpeg,bmp,tiff,不超过2M\" name=\"spefile#\" id=\"spefile#\" οnchange=\"inpTxt(this)\" size=\"28\" />";
temp+= "</div>";
temp+= "<em style=\"padding-left:0;\" class=\"grayfont\"></em>";
temp+= "</td>";
temp+= "<td><a href=\"javascript:void(0);\">删除</a></td>";
temp+= "</tr>";
temp+= "<tr class=\"spefile#\" id=\"spefile#tr\">";
temp+= "<td colspan=\"2\" height=\"15\"></td>";
temp+= "</tr>";
var rowLen = $(".spefile").length;
index_0=rowLen;
var num =index_0;
num = parseInt(num) + 1;
var newRow = $(temp.replace(new RegExp("#","gm"),num));
$("#spefilelast").before(newRow);
}
js 插入到外面
最新推荐文章于 2022-08-19 17:23:54 发布