js多文件上传框
来源:互联网 发布:java 路由器端口扫描 编辑:程序博客网 时间:2024/04/28 14:04
<script type="text/javascript">
/**
* 生成多附件上传框
*/
function createInput(){
var str = '<div name="div" ><font style="font-size:12px;">附件</font>'+
' '+ '<input type="file" contentEditable="false"' +
'" name="uploads" value="" style="width: 220px" /><input type="button" value="删除" onclick=" removeInput(event)" />'+'</div>';
document.getElementById('more').insertAdjacentHTML("beforeEnd",str);
}
/**
* 删除多附件删除框
*/
function removeInput(evt){
var el = evt.target == null ? evt.srcElement : evt.target;
var div = el.parentNode;
var cont = document.getElementById('more');
if(cont.removeChild(div) == null){
return false;
}
return true;
}
</script>
*****************************************************
<body>
<table width="276" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<input type="button" value="添加附件" onclick="createInput();" />
</td>
</tr>
<tr>
<td>
<div id="more"></div>
</td>
</tr>
</table>
action中的属性为:
private List<File> uploads;
private List<String> uploadsContentType;
private List<String> uploadsFileName;
</body>
- js多文件上传框
- 多文件上传js
- js多文件上传
- js多文件上传
- js 多文件上传
- JS常用---多文件上传
- js实现 多文件 上传。
- js实现多文件上传
- js实现多文件上传
- 多文件上传 js实现
- js实现多文件上传
- JS+Struts2多文件上传完整示例
- 一个多文件上传的 简单JS
- 常用 js+.. 多文件上传组件
- 使用MultFile.js实现多文件上传
- AjaxFileupload.js实现多文件上传
- node.js + busboy 多文件上传
- thinkphp+js写的多文件上传
- Linux程序设计入门--信号处理
- 兆鹏带你读Watir——【第二篇】浏览器状态及线程等待
- C语言结构体
- linux下配置ip地址
- Linux程序设计入门--线程操作
- js多文件上传框
- vs2010 连接vss2005源码管理器
- Linux实用操作日记
- oracle 存储过程语句总结
- MySQL 性能提示
- MVC 过滤器Filter
- iPad五大另类功能:解决孩子哭闹等问题
- C语言预处理
- 最终版 Android 3.0 平台和 SDK 工具更新