多附件上传组件代码(Add and Remove HTML elements dynamically with Javascript)

用JavaScript实现多文件选择功能
博主在过去两天用JavaScript完成了多文件选择功能。实现基于参考资料,但使用时遇到‘mFile.children.value is null or not a object’错误,通过改为‘mFile.children[j].value’解决。还增加了在HTML INPUT元素中显示完整路径的迷你弹出窗口,部分代码片段来自参考资料。

Nov 17. 2005
 

In th e past two days, I finished the function of multiple file selection using javascript.

The implementation is built on the basis of reference (2). However, i encounter the following error when using it.

"mFile.children.value is null or not a object"

I solved this problem by changing it to

"mFile.children[j].value"

Another improvement is the addition of the mini popup window showing the full path appearing in the HTML INPUT element
. Without the popup window, part of a long path will be hidden. some code snippets (javascript functions) are from reference (3)


1. http://www.dustindiaz.com/add-and-remove-html-elements-dynamically-with-javascript/
2. http://www.yinhuchem.com/tree/gbook/blogview.asp?logID=26&cateID=2
3 .http://evget.com/articles/evget_1107.html (可编辑的 HTML JavaScript 表格控件 DataGrid)
4. 如何接收INPUTfield 的值 INPUT type=file Element | input type=file Objecthttp://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/objects/input_file.asp

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值