1.
<style type="text/css">
#upload {
padding: 4px 10px;
height: 20px;
line-height: 20px;
position: relative;
cursor: pointer;
overflow: hidden;
color: #888;
background: #fafafa;
border: 1px solid #ddd;
border-radius: 4px;
display: inline-block;
*display: inline;
*zoom: 1
}
#upload input {
position: absolute;
font-size: 100px;
right: 0;
top: 0;
cursor: pointer
}
</style>
<a id="upload">上传文件
<span style="white-space:pre"> </span><input type="file" name="excelFile" id="excelFile" required=true />
</a>
2.
隐藏这个提交按钮,用其他按钮来代替
<input type="button" οnclick="fileType.click()" value="上传文件"/>
<input id="fileType" style="display:none" type="file"/>