Advertisement
Bedhoel

Untitled

Sep 10th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function tambah_data(){
  2.             var  html ='<div id="file_div_'+Ids+'" >';
  3.                      html+='<div class="row"><div class="col-md-2">';
  4.                      html+='   <input type="text" placeholder="Nama File" class="form-control" name="nama_file[]">';
  5.                      html+='</div>';
  6.                      html+='<div class="col-md-2">';
  7.                      html+='    <input type="file" name="file[]" onChange="readImage(this,'+Ids+')">';
  8.                      html+='</div>';
  9.                      html+='<div class="col-md-2">';
  10.                      html+='  <button  onClick="removeFile(\''+Ids+'\');" type="button" class="btn btn-danger">X</button>';
  11.                      html+='</div></div>';
  12.                      html+='<div class="row">';
  13.                      html+='<div class="col-md-5">';
  14.                         html+='<br/><img style="width:150px;height:150px" id="img_'+Ids+'">';
  15.                      html+='</div>';
  16.                      html+='</div>';
  17.                  html+='<br/></div>';
  18.                 $("#gen_data").append(html);
  19.                 Ids++;
  20.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement