<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>定义input type="file" 的样式</title>
<style type="text/css">
body{ font-size:14px;}
input{ vertical-align:middle; margin:0; padding:0}
.file-box{ position:relative;width:340px}
.txt{ height:22px; border:1px solid #cdcdcd; width:180px;}
.btn{ background-color:#FFF; border:1px solid #CDCDCD;height:24px; width:70px;}
.file{ position:absolute; top:0; right:80px; height:24px; filter:alpha(opacity:0);opacity: 0;width:260px }
</style>
</head>
<body>
<div class="file-box">
  <form action="" method="post" enctype="multipart/form-data">
 <input type='text' name='textfield' id='textfield' class='txt' />  
 <input type='button' class='btn' value='浏览...' />
    <input type="file" name="fileField" class="file" id="fileField" size="28" onchange="document.getElementById('textfield').value=this.value" />
 <input type="submit" name="submit" class="btn" value="上传" />
  </form>
</div>
</body>
</html>

解决方案 »

  1.   

    要怎么样才能把所选择的文件在其他 页面显示出来呢,比如Excel表格
      

  2.   

    http://blog.csdn.net/ygzk123/article/details/12623985
    http://tiannanyi.blog.163.com/blog/static/187359344201421441343901/
      

  3.   

    上传像1楼那么做就行,但是把excel在其他页面进行编辑就不是那么简单了!你可以要用户直接下载之后在本地编辑。
      

  4.   

    有控件的   以前用过一个叫WEBOFFICE   你可以看看