Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Ids = 1;
- function tambah(){
- var html ='<div id="gen_div_'+Ids+'" >';
- html+='<div class="col-md-3">';
- html+='<label>Text '+Ids+' </label>';
- html+='<input type="text" class="form-control" name="agama[]" required>';
- html+='</div>';
- html+='<div class="col-md-1"><br/>';
- html+=' <button type="button" onclick="hapus(\''+Ids+'\')" class="btn btn-primary">Hapus</button>';
- html+='/div>';
- html+='</div>';
- $("#gen_data").append(html);
- Ids++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement