怎样让input type=file 只读,并能实现文件上传
试过很多方法,都未能实现,如:
设置readOnly=true设置disable设置this.blur()通过javascript来控制。。。都不行,因为只要是readOnly或disable,都无法弹出选择文件的窗口,即使用javascript实现了弹出,上传时也不行(ASP.net中),最后还是把中心放在了让他没有焦点上,设置了hideFocus=true也不行,于是开始详细的翻阅MSDN,input type=file的所有属性,终于还是让我找到了
<INPUT?class="text"?id="fileUpload"?style="WIDTH:?500px;cursor:hand"?type="file"?name="fileUpload"??
http://blog.csdn.net/changezhong/archive/2006/09/02/1160663.aspx
可以啊~