以下是可选项的参数说明:(红色的属性代表常用的)
<wbr></wbr>
1 |
uploader |
上传控件的主体文件,flash控件 <wbr><wbr> 默认值='uploadify.swf'</wbr></wbr> |
2 |
script <wbr></wbr> |
相对路径的后端脚本,它将处理您上传的文件。 绝对路径前缀或'/'或'http'的路径 <wbr> 默认值='uploadify.php'</wbr> |
3 |
checkScript <wbr></wbr> |
检查该文件是否已经选择驻留在服务器上。 |
4 |
scriptData <wbr></wbr> |
可提供URL传递参数。用来传递get参数。例如: <wbr> index.jsp?id=1&action=uploadify可以设置成:</wbr> 'script': 'index.jsp', 'scriptData':{'id':1,'action':'uploadify'}, 注:要设置‘method’:‘GET’. <wbr></wbr> |
5 |
fileDataName <wbr></wbr> |
<wbr>您的文件在上传服务器脚本阵列的名称。<br><wbr><wbr> 默认值='Filedata'</wbr></wbr></wbr> |
6 |
method <wbr></wbr> |
<wbr>设置为发送到后端脚本的方法。要么'get'或post'。</wbr> <wbr><wbr> 默认值'post'</wbr></wbr> |
7 |
<wbr></wbr> |
<wbr>?</wbr> |
8 |
folder <wbr></wbr> |
您想将文件保存到的路径。考虑到安全问题,一般并不在客户端设定后供服务器得到所存的路径。我试了下。这个参数好像以get的方式传递的。设定post得不到这个值。 |
9 |
queueID <wbr></wbr> |
<wbr>文件队列ID。与div的id一致。</wbr> |
10 |
queueSizeLimit <wbr></wbr> |
限制在一次队列中的次数(可选定几个文件)。默认值= 999,而一次可传几个文件有 simUploadLimit属性决定。 |
11 |
multi <wbr></wbr> |
是否允许同时上传多文件,可设定true或false。 <wbr> 默认false。设定true时,选中的文件是当前项。</wbr> |
12 |
auto <wbr></wbr> |
选定文件后是否自动上传,可设定true或false。 <wbr> 默认false</wbr> |
13 |
fileDesc <wbr></wbr> |
出现在上传对话框中的文件类型描述。与fileExt需同时使用 |
14 |
fileExt <wbr></wbr> |
支持的格式,启用本项时需同时声明fileDesc。 如:‘*.rar,*.doc <wbr></wbr> |
15 |
sizeLimit <wbr></wbr> |
控制上传文件的大小,单位byte |
16 |
simUploadLimit <wbr></wbr> |
多文件上传时,同时上传文件数目限制。默认1 <wbr> 一次可传几个文件。</wbr> |
17 |
buttonText <wbr></wbr> |
默认按钮的名字。默认BROWER |
18 |
<wbr></wbr> |
使用图片按钮,设定图片的路径即可。 |
19 |
hideButton <wbr></wbr> |
上传按钮的隐藏。true 或false。默认flase |
20 |
rollover <wbr></wbr> |
<wbr>?</wbr> |
21 |
width <wbr></wbr> |
<wbr>按钮图片的长度。默认 110</wbr> |
22 |
height <wbr></wbr> |
<wbr>按钮图片的高度。默认 30</wbr> |
23 |
wmode <wbr></wbr> |
<wbr>背景透明transparent 与不透明opaque设定。默认 不透明</wbr> <wbr></wbr> |
24 |
cancelImg <wbr></wbr> |
<wbr>取消按钮。设定图片路径。默认cancel.png</wbr> <wbr></wbr> <wbr></wbr> |
25 |
onInit <wbr></wbr> |
函数, 初始化时的状态。 onInit: function() {<wbr></wbr> $("#id").html("上传前");}, |
26 |
onComplete <wbr></wbr> |
event: 事件对象 queueID: 完成文件的唯一标识符。 fileObj: <wbr></wbr> <wbr> • <strong>name</strong> – 文件名</wbr> <wbr> • <strong>filepath</strong> –上传路径</wbr> <wbr> • <strong>size</strong> – 文件大小</wbr> <wbr> • <strong>creationDate</strong> – 文件创建时间</wbr> <wbr> • <strong>modificationDate</strong> –<a name="OLE_LINK9"></a><a name="OLE_LINK8">文件最近修改时间</a></wbr> <wbr> • <strong>type</strong> –文件的扩展名</wbr> response: 服务器回调的数据 data: <wbr></wbr> <wbr> • <strong>fileCount</strong> – The total number of files left in the queue</wbr> <wbr> • <strong>speed</strong> – 平均上传速度 KB/s</wbr> 如: onComplete: function(event, queueID, fileObj) { <wbr> alert("文件:" +fileObj.name + "上传失败");<wbr><wbr>}</wbr></wbr></wbr> <wbr></wbr> |
27 |
onSelectOnce <wbr></wbr> |
函数:可传递二个参数 event: The event object. data: An object containing details about the select operation. <wbr> • <strong>fileCount</strong> – The total number of files in the queue</wbr> <wbr> • <strong>filesSelected</strong> – The number of files selected in the select operation</wbr> <wbr> • <strong>filesReplaced</strong> – The number of files that were replaced in the queue</wbr> <wbr> • <strong>allBytesTotal</strong> – The total number of bytes for all files in the queue</wbr> <wbr></wbr> |
28 |
onCancel <wbr></wbr> |
函数:可传递四个参数 event: The event object. queueID: The unique identifier of the file that was cancelled. fileObj: An object containing details about the file that was selected. <wbr><wbr> • <strong>name</strong> – The name of the file</wbr></wbr> <wbr><wbr> • <strong>size</strong> – The size in bytes of the file</wbr></wbr> <wbr><wbr> • <strong>creationDate</strong> – The date the file was created</wbr></wbr> <wbr><wbr> • <strong>modificationDate</strong> – The last date the file was modified</wbr></wbr> <wbr><wbr> • <strong>type</strong> – The file extension beginning with a '.'</wbr></wbr> <wbr></wbr> data: Details about the file queue. <wbr><wbr> • <strong>fileCount</strong> – The total number of files left in the queue</wbr></wbr> <wbr><wbr> • <strong>allBytesTotal</strong> – The total number of bytes left for all files in the queue</wbr></wbr> <wbr></wbr> |
29 |
onClearQueue <wbr></wbr> |
函数:可传递一个参数 event: The event object. |
30 |
onQueueFull <wbr></wbr> |
函数:可传递二个参数 • event - The event object. • queueSizeLimit - The maximum size of the queue. <wbr></wbr> |
31 |
onError <wbr></wbr> |
<wbr></wbr> event: The event object. queueID: The unique identifier of the file that was errored. fileObj: An object containing details about the file that was selected. <wbr> • <strong>name</strong> – The name of the file</wbr> <wbr> • <strong>size</strong> – The size in bytes of the file</wbr> <wbr> • <strong>creationDate</strong> – The date the file was created</wbr> <wbr> • <strong>modificationDate</strong> – The last date the file was modified</wbr> <wbr><strong>• type</strong> – The file extension beginning with a '.'</wbr> errorObj: An object containing details about the error returned. <wbr><strong>• type</strong> – Either 'HTTP', 'IO', or 'Security'</wbr> <wbr><strong>• info</strong> – An error message describing the type of error returned</wbr> <wbr></wbr> |
32 |
onOpen <wbr></wbr> |
函数:可传递三个参数 event: The event object. queueID: The unique identifier of the file that was opened. fileObj: An object containing details about the file that was selected. <wbr> • <strong>name</strong> – The name of the file</wbr> <wbr> • <strong>size</strong> – The size in bytes of the file</wbr> <wbr> •<wbr><strong>creationDate</strong> – The date the file was created</wbr></wbr> <wbr> • <strong>modificationDate</strong> – The last date the file was modified</wbr> <wbr> • <strong>type</strong> – The file extension beginning with a '.'</wbr> <wbr></wbr> |
33 |
onProgress <wbr></wbr> <wbr></wbr> |
函数:可传递四个参数 event: The event object. queueID: The unique identifier of the file that was updated. fileObj: An object containing details about the file that was selected. <wbr> • <strong>name</strong> – The name of the file</wbr> <wbr> • <strong>size</strong> – The size in bytes of the file</wbr> <wbr> • <strong>creationDate</strong> – The date the file was created</wbr> <wbr> • <strong>modificationDate</strong> – The last date the file was modified</wbr> <wbr> • <strong>type</strong> – The file extension beginning with a '.'</wbr> <wbr></wbr> data: An object containing details about the upload and queue. <wbr> • <strong>percentage</strong> – The current percentage completed for the upload</wbr> <wbr> • <strong>bytesLoaded</strong> – The current amount of bytes uploaded</wbr> <wbr> • <strong>allBytesLoaded</strong> – The current amount of bytes loaded for all files in the queue</wbr> <wbr> • <strong>speed</strong> – The current upload speed in KB/s</wbr> <wbr></wbr> |
34 |
onSelect <wbr></wbr> <wbr></wbr> |
event: The event object. queueID: The unique identifier of the file that was selected. fileObj: An object containing details about the file that was selected. <wbr> • <strong>name</strong> – The name of the file</wbr> <wbr> • <strong>size</strong> – The size in bytes of the file</wbr> <wbr> • <strong>creationDate</strong> – The date the file was created</wbr> <wbr> • <strong>modificationDate</strong> – The last date the file was modified</wbr> <wbr> • <strong>type</strong> – The file extension beginning with a '.'</wbr> <wbr></wbr> |
35 |
onAllComplete <wbr></wbr> <wbr></wbr> |
<wbr></wbr> event: The event object. data: An object containing details about the upload process. <wbr> • <strong>filesUploaded</strong> – The total number of files uploaded</wbr> <wbr> • <strong>errors</strong> – The total number of errors while uploading</wbr> <wbr> • <strong>allbytesLoaded</strong> – The total number of bytes uploaded</wbr> <wbr> • <strong>speed</strong> – The average speed of all uploaded files</wbr> <wbr></wbr> |
36 |
onCheck <wbr></wbr> |
函数:可传递五个参数 <wbr></wbr> event: The event object. checkScript: The path to the file checking script. fileQueue: A file queue object consisting of<wbr> key/value pairs with the queue ID as the key and the filename as the value.</wbr> folder: The path to the upload folder. single: True if only one file is being uploaded from the queue. |
发表评论
-
在IE6下js设置 option selected属性:unspecified error(未指明的异常)”
2011-06-15 10:45 924今天在做项目的时候,用IETest在IE6下面发现有如下错误: ... -
CSS的渲染效率–高效的CSS优化
2011-06-15 10:56 735链接地址:http://woshao.com/ ... -
最全的CSS浏览器兼容问题
2011-06-15 13:03 687链接地址:http://woshao. ... -
四大游览器兼容问题综合实例
2011-06-26 11:02 792转载地址:http://www.css-js.com/thre ... -
WEB设计师常用的设计模式
2011-06-26 11:13 867原文地址:http://woshao.com/article/ ... -
推荐一个全自动在线做gif进度条
2011-06-27 17:48 3330今天在网上寻找进度条,发现有很多打包的都差不多,没有什么灵活性 ... -
jquery.form.js 遇到的奇怪问题
2011-11-17 11:16 1207我的这个jquery.form.js不知道是哪个版本的 觉 ... -
js 小数计算误差
2011-12-07 20:52 1335今天在做有关基金财务数据的计算校验时,发现了js在计算小数时的 ... -
JavaScript 原型
2011-12-11 14:07 1042理解JavaScript原型 发布时间:2011-12-10 ...
相关推荐
`fileTypeDesc`和`fileTypeExts`用于限制可选文件类型。`queueSizeLimit`和`simUploadLimit`控制了上传队列的最大数量和同时上传的数量。`auto`参数设定是否自动上传,而`onQueueFull`和`onUploadSuccess`则是自定义...
下面将详细介绍这个插件的使用和相关知识点。 ### 1. jQuery Uploadify简介 `jQuery Uploadify`是一个开源的文件上传组件,它通过异步方式实现多文件上传,提高了用户体验。它支持预览、取消上传、限制文件类型和...
在Web开发中,文件上传是一项常见的需求,而jQuery的uploadify插件则为开发者提供了一个简单易用的解决方案。Uploadify是一款基于JavaScript和Flash的文件上传组件,它能够优雅地处理多文件上传,并且提供了丰富的...
'queueID': 'fileQueue', // 队列容器ID(可选) 'onUploadSuccess': function(file, data, response) { console.log('文件' + file.name + '上传成功,响应码:' + response); }, 'onUploadError': function...
本篇将详细介绍如何在非`<input>`标签(如`<span>`)上模拟`<input type="file">`的功能,并探讨uploadify插件的使用,以提升用户体验。 首先,让我们来看看如何在`<span>`标签上实现文件选择功能。通常,我们会将`...
- **功能描述**:设置文件上传时显示的数据类型,可选“speed”(上传速度)或“percentage”(百分比)。 #### queueID - **功能描述**:标识上传队列的DOM元素ID,用于显示上传队列的情况。 #### ...
本文将详细介绍几个优秀的jQuery插件,这些插件能够显著提高页面效果的实现效率,为Web项目带来更加流畅和互动的体验。 #### jQuery核心库:一切的基础 jQuery的核心库是整个框架的基石,它提供了诸如选择元素、...
通过以上步骤,我们可以顺利地在网站中集成Uploadify插件来实现文件上传功能。需要注意的是,在实际开发过程中,还需要根据具体的应用场景对上传的文件进行更严格的验证,比如文件大小限制、文件类型限制等,以保证...
还可以对Uploadify插件进行更多详细配置,包括但不限于以下参数: - `uploader`:Flash文件上传控件的相对路径,默认为`uploadify.swf`。 - `script`:后端处理上传文件的脚本路径,默认为`uploadify.php`。 - `...
上述代码中,`swf`指定了Flash组件的位置,`uploader`是服务器端处理上传的URL,`fileTypeDesc`和`fileTypeExts`限制了可选文件类型,`multi`和`auto`分别设置为true表示支持多文件上传和自动上传。`onUploadSuccess...
此外,该项目还利用了jQuery.uploadify插件来实现文件上传功能,增加了项目的实用性和多样性。 1. **ASP.NET框架** ASP.NET是微软开发的一种服务器端Web应用程序框架,用于构建动态网站、Web应用和服务。在这个...
本文将详细介绍Uploadify 2.1.4的使用方法及其核心特点。 一、安装与配置 首先,你需要在项目中引入jQuery库和Uploadify的JavaScript及CSS文件。通常,这些文件会包含在`vinUploadifyTest`压缩包内。将它们放在...
- **buttonCursor**:字符串,设定按钮鼠标悬停时的光标样式,可选`'hand'`或`'arrow'`。 - **buttonImage**:字符串,设置按钮的背景图片路径。 - **buttonText**:字符串,设置按钮的文字内容。 除此之外,还有`...
'queueID': 'fileQueue', // 可选,队列ID 'fileTypeDesc': '所有文件', 'fileTypeExts': '*.*', 'multi': true, // 开启批量上传 'onUploadSuccess': function (file, data, response) { console.log('文件' ...
Uploadify 是一个基于 jQuery 的文件上传插件,它支持 AJAX 无刷新上传、多文件同时上传以及上传进度显示,能够显著提升用户在网页上进行文件上传的体验。要使用 Uploadify,你需要确保环境满足以下条件:jQuery ...
总的来说,Uploadify是一个强大的多文件上传工具,它提供了丰富的功能和高度的可定制性,能够帮助开发者轻松地在网页上实现高效、友好的文件上传功能。通过深入理解和灵活运用,我们可以为用户创造更出色的文件上传...
首先,`uploadify.zip` 可能包含的是Uploadify插件。Uploadify是一款基于jQuery的文件上传插件,它提供了异步、批量和多文件上传的功能。通过AJAX技术,用户可以选择多个文件并一次性上传,无需刷新页面,提高了上传...