javascript - How to add a link that can load to file upload button upon clicking -
i have following code. ask user upload file.
.form-control { font-size:18px; font-family: "helvetica neue",helveticaneue; } .form-horizontal { padding-left: 120px; padding-right: 130px; font-size:20px; font-family: "helvetica neue",helveticaneue; }
<!doctype html> <html> <head> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script src="http://gregpike.net/demos/bootstrap-file-input/bootstrap.file-input.js"></script> <meta charset="utf-8"> </head> <body> <!--- display form --> <form id="id-method1form" class="form-horizontal" method="post" enctype="multipart/form-data"> <input type='hidden' name='csrfmiddlewaretoken' value='jdujvarwokoxbqmoesashtadntlwjs5u' /> <div id="div_id_inputfile_param" class="form-group"> <label for="id_inputfile_param" class="control-label col-lg-2 requiredfield"> input file</label> <div class="controls col-lg-8"> <input class="clearablefileinput" id="id_inputfile_param" name="inputfile_param" data-filename-placement="inside" type="file" /> </div> </div> </label> </div> </div> </div> <div class="form-group"> <div class="aab controls col-lg-2"></div> <div class="controls col-lg-8"> <input type="submit" name="submit" value="submit" class="btn btn-primary" id="submit-id-submit" /> </div> </div> </form> <!--- style browse button--> <script>$(document).ready(function(){$('input[type=file]').bootstrapfileinput();});</script> </body> </html>
what want add link next browse button. this:
so when it's clicked default file loaded input file field. how can achieve that?
Comments
Post a Comment