Blame view

js/script.js 728 Bytes
60c6f0893   root   init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  function AddRow(_this, Pid)
  {
  	Row = $("#"+Pid +" tr");
  	IndexLast = $("#"+Pid +" tr:last").index();
  $(Row[IndexLast-1]).after("\
  				<tr id=\""+Pid+"_"+IndexLast+"\">\
  					<td></td>\
  					<td><input class=\"text-size03\" type=\"text\" name=\""+Pid+"[n"+IndexLast+"][]\"></td>\
  					<td><input class=\"text-size04\" type=\"text\" name=\""+Pid+"[n"+IndexLast+"][]\"></td>\
  					<td><input class=\"text-size05\" type=\"text\" name=\""+Pid+"[n"+IndexLast+"][]\"></td>\
  					<td><a class=\"btn-delete\" href=\"#\" onclick=\"DeliteRow(this,'"+Pid+"_"+IndexLast+"'); return false;\">Удалить</a></td>\
  				</tr>");
  }
  
  function DeliteRow(_this, Pid)
  {
  	$("#"+Pid+" input").attr("value","");
  	$("#"+Pid).css("display","none");
  }