如何是使 file 域文本内容不能编辑? <input type="file" onkeydown="return false" onpaste="return false"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <input type="file"disabled size="20"> <input type="file" disabled> disabled是不行的,连浏览也不能用了,本身就是readonly的了。佩服 net_lover(孟子E章) 用自己的button触发file控件,可以达到File控件不能编辑的效果代码:————————————————————————————————————<title>车仔手扎:控制File控件不能编辑</title> <input type="file" id="fileAttachment" name="fileAttachment" class="button" onkeypress="return false;" style="display:inline;VERTICAL-ALIGN: middle; WIDTH:0px; position:absolute;clip: rect(0 0 0 0)"> <button name="btnAttachment" id="btnAttachment" onclick="return fileAttachment.click();" >选取文件</button> <input type="file" name="file" onkeypress='return false;' onpaste="return false;" onkeydown="return false" ondrag="return false"> 问个取值方法 JQuery 插件机制 jQuery.fn.extend(object)和jQuery.extend(object)区别? Jquery 的插件Validate问题! 一个面试遇到的JavaScript变量问题 用一个js方法获取页面中相同的KEY的数值,其中数值不一样,但是取得是undefined,不是KEY的VALUE的数值?为什么? 如何获取周日 如何获取此值?? 请教个高级js的问题 如何在点击一个按钮后改变表格某一行的背景色? 如何把用户名和密码写入超链接中? 数组排序问题??? 如何得到radio得值?
————————————————————————————————————
<title>车仔手扎:控制File控件不能编辑</title>
<input type="file" id="fileAttachment" name="fileAttachment" class="button" onkeypress="return false;" style="display:inline;VERTICAL-ALIGN: middle; WIDTH:0px; position:absolute;clip: rect(0 0 0 0)">
<button name="btnAttachment" id="btnAttachment" onclick="return fileAttachment.click();" >选取文件</button>