需求
解决方案
利用lable标签和input进行绑定,更改lable的样式,触发input事件
<form id="myform" action="/device/excel/import.htm", method="post" , enctype="multipart/form-data" style="float: right;" >
<%--通过label标签与input标签绑定--%>
<label for='my_file' class='inputlabelBox' >
<a class="btn btn-submit" href="javascript:function_select_file();"><i class="glyphicon glyphicon-export"></i>上传资产信息</a>
</label>
<input type="file" name="file" onchange="change(event)" style="float: right; width: 200px; height: 35px; display:none;" id="my_file" />
</form>