解决方案 »

  1.   

    不是有<input type="file">吗
      

  2.   

    你可以模拟通过CSS来控制模拟input file的样式,比如
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <style>
    input{float:left;margin:0;padding:0;background:none;border:none; }
    .upload{ width:300px;height:40px;line-height:40px;position:relative;font-size:18px; overflow:hidden;}
    .upload .text{width:220px;border:solid 1px #ccc;height:22px;line-height:22px;}
    .upload .file{position:absolute;top:0;right:0;width:100%;height:24px;border:solid 1px #ccc;opacity:0;filter:alpha(opacity=0);cursor:pointer;}
    .upload span{float:right;width:60px;height:24px;line-height:24px;background:#09C;color:#fff; text-align:center;cursor:pointer; border-radius:5px; }
    </style>
    </head><body>
    <div class="upload">
    <input type="text" class="text" id="txtfile"/>
        <span>上传</span>
        <input type="file" class="file" onchange="document.getElementById('txtfile').value=this.value;"/>
    </div>
    </body>
    </html>
      

  3.   

    swfupload 是个flash上传插件 
      

  4.   

    要用插件的话 推荐一个kindediter
      

  5.   

    swfupload挺好使,但是中文需要处理一下。
      

  6.   

    用css覆盖个图片在<input type="file"上面就可以了。
    可以参考这里http://blog.csdn.net/fdipzone/article/details/17051221