我把表单的file文件域标志为readonly,结果在IE6中浏览按钮就点不动了,怎么办?

xunyiren 2003-02-17 03:22:21
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" enctype="multipart/form-data" method="post" action="">
<input type="file" name="file" readonly>
</form>
</body>
</html>
代码如上,我是想在上传时为了避免直接输入,而让用户必须点浏览文件按钮上传文件;现在浏览按钮就点不动了,而IE5则没这个问题,怎么解决
...全文
63 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
xuxijian2003 2003-02-17
  • 打赏
  • 举报
回复
yes
qiushuiwuhen 2003-02-17
  • 打赏
  • 举报
回复
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" enctype="multipart/form-data" method="post" action="">
<input type="file" name="file" onkeydown="return false" onpaste="return false">
</form>
</body>
</html>

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧