html部分
<div class="form-group">
<label class="col-sm-3 control-label">选择数据文件</label>
<div class="input-group">
<input id="docPath" type="text" class="form-control">
<span id="scan" style="position: relative" class="btn btn-primary input-group-addon">浏览<input id="path" style=" 60px;height:40px; position: absolute;top:-6px;left: -4px;opacity: 0; filter:alpha(opacity=0)" class="form-control" type="file"></span>
</div>
</div>
JavaScript部分
$("#path").change(function () {
$("#docPath").val($(":file").val());
});