Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function tambah_data(){
- var html ='<div id="file_div_'+Ids+'" >';
- html+='<div class="row"><div class="col-md-2">';
- html+=' <input type="text" placeholder="Nama File" class="form-control" name="nama_file[]">';
- html+='</div>';
- html+='<div class="col-md-2">';
- html+=' <input type="file" name="file[]" onChange="readImage(this,'+Ids+')">';
- html+='</div>';
- html+='<div class="col-md-2">';
- html+=' <button onClick="removeFile(\''+Ids+'\');" type="button" class="btn btn-danger">X</button>';
- html+='</div></div>';
- html+='<div class="row">';
- html+='<div class="col-md-5">';
- html+='<br/><img style="width:150px;height:150px" id="img_'+Ids+'">';
- html+='</div>';
- html+='</div>';
- html+='<br/></div>';
- $("#gen_data").append(html);
- Ids++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement