1 m = 0 ;// 用于区分input
// 新增一条录入
function AddTR(){
m += 1;
var tableObject = document.getElementById("fpqk_tab");
var oTr = tableObject.rows[1];
var newTr = oTr.cloneNode(true);
tableObject.getElementsByTagName("tbody")[0].appendChild(newTr);
newTr = tableObject.rows[tableObject.rows.length-1];
newInputs= newTr.getElementsByTagName("input");
newTd = newTr.lastChild;
newTd.innerHTML = "<a href='#' onclick='DelRow(this)' id = 'del_input' title='删除此行' >删除</a>";
for(i=0;i<newInputs.length;i++){
newInputs[i].id = newInputs[i].id + m ; // 用于区分input
}
document.getElementById("but_add"+m).onclick = function(){SelectUserSingle('hydm'+m,'hyxm'+m,'','form1')}
document.getElementById("but_del"+m).onclick = function(){ClearUser('hydm'+m,'hyxm'+m);}
// 有些浏览器不支持setAttribute()方法,建议使用以上方法代替;
//document.getElementById("but_add"+m).setAttribute("onclick","alert( '本时间段秒杀结束,请关注下一时间段!')");
//document.getElementById("but_del"+m).setAttribute("onclick","ClearUser('hydm"+m+"','hyxm"+m+"')");
//$("but_add"+m).bind('onclick',function(){ClearUser('hydm'+m,'hyxm'+m);});
}