Advertisement
Bedhoel

Untitled

Aug 17th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var Ids = 1;
  2.         function tambah(){
  3.             var  html ='<div id="gen_div_'+Ids+'" >';
  4.                     html+='<div class="col-md-3">';
  5.                       html+='<label>Text '+Ids+' </label>';
  6.                       html+='<input type="text" class="form-control" name="agama[]" required>';
  7.                     html+='</div>';
  8.                       html+='<div class="col-md-1"><br/>';
  9.                       html+='  <button type="button" onclick="hapus(\''+Ids+'\')" class="btn btn-primary">Hapus</button>';
  10.                       html+='/div>';
  11.                  html+='</div>';
  12.                 $("#gen_data").append(html);
  13.                 Ids++;
  14.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement