<input type='file' readOnly>

解决方案 »

  1.   

    to Gdj(陈水.智商只有129.非卖品):
    此时你的浏览按钮也不能用了,我需要可用阿
      

  2.   

    倒是有一个方法:<input type='file' onKeyDown="return false">可是会觉得怪怪的
      

  3.   

    你可以用另一个<input readonly>浮动挡在上面。可输入的下拉框就是这么实现的。可到js区搜索一下。
      

  4.   

    to Gdj(陈水.智商只有129.非卖品) :
    你说的是这样一个贴吗?http://community.csdn.net/Expert/topic/4739/4739574.xml?temp=.239895
    可是我还是不太清楚应该怎样使用?你有实例吗?谢谢
      

  5.   

    不可以!
    基于安全的考虑,在web方式下file控件不接受初值。
      

  6.   

    <input type="file" id="file_upload" style="display:none">
    <input type="button" onclick="document.getElementById('file_upload.click()')" value="浏览...">
      

  7.   

    同意 aotianlong 老兄的做法明智之举,
    大名鼎鼎的网易也是这样处理的