Jquery Uploadify使用参数详解
开始上传 $('#uploadify_1').uploadifyUpload();
| 1 | uploader | uploadify.swf文件的相对路径,该swf文件是一个带有文字BROWSE的按钮,点击后淡出打开文件对话框,flash控件
默认值=’uploadify.swf’ |
| 2 | script | 相对路径的后端脚本,它将处理您上传的文件。
绝对路径前缀或’/'或’http’的路径 默认值=’uploadify.php’ |
| 3 | checkScript | 检查该文件是否已经选择驻留在服务器上(用来判断上传选择的文件在服务器是否存在的后台处理程序的相对路径)。 没有默认值。 官方例子中’check.php’是提供核心文件 |
| 4 | scriptData | 可提供URL传递参数。用来传递get参数。例如:
index.jsp?id=1&action=uploadify可以设置成: ‘script’: ‘index.jsp’, ‘scriptData’:{‘id’:1,’action’:'uploadify’}, 注:要设置‘method’:‘GET’. |
| 5 | fileDataName | 您的文件在上传服务器脚本阵列的名称。 默认值=’Filedata’ |
| 6 | method | 设置为发送到后端脚本的方法。要么’get’或post’。
默认值’post’ |
| 7 | scriptAccess | flash脚本文件的访问模式,如果在本地测试设置为always,默认值:sameDomain |
| 8 | folder | 您想将文件保存到的路径。考虑到安全问题,一般并不在客户端设定后供服务器得到所存的路径。我试了下。这个参数好像以get的方式传递的。设定post得不到这个值。 |
| 9 | queueID | 文件队列ID。该ID与存放文件队列的div的ID一致。参考上一篇例子的用法。 |
| 10 | queueSizeLimit | 限制在一次队列中的次数(可选定几个文件)。默认值= 999,而一次可传几个文件有 simUploadLimit属性决定。 |
| 11 | multi | 是否允许同时上传多文件,可设定true或false。
默认false。设定true时,选中的文件是当前项。 |
| 12 | auto | 选定文件后是否自动上传,可设定true或false。
默认false |
| 13 | fileDesc | 出现在上传对话框中的文件类型描述。与fileExt需同时使用 |
| 14 | fileExt | 支持的格式,启用本项时需同时声明fileDesc。
如:‘*.rar;*.doc |
| 15 | sizeLimit | 控制上传文件的大小,单位byte |
| 16 | simUploadLimit | 多文件上传时,同时上传文件数目限制。默认1
一次可传几个文件。 |
| 17 | buttonText | 默认按钮的名字。默认BROWER |
| 18 | buttonImg | 使用图片按钮,设定图片的路径即可。 |
| 19 | hideButton | 上传按钮的隐藏。true 或false。默认flase |
| 20 | rollover | 值为true和false,设置为true时当鼠标移到浏览按钮上时有反转效果。 |
| 21 | width | 按钮图片的长度。默认 110 |
| 22 | height | 按钮图片的高度。默认 30 |
| 23 | wmode | 背景透明transparent 与不透明opaque设定。默认 不透明 |
| 24 | cancelImg | 取消按钮。设定图片路径。默认cancel.png |
| 25 | onInit | 函数, 初始化时的状态。
onInit: function() { $(“#id”).html(“上传前”);}, |
| 26 | onComplete | 函数:可传递五个参数
event: 事件对象 queueID: 完成文件的唯一标识符。 fileObj: • name – 文件名 • filepath –上传路径 • size – 文件大小 • creationDate – 文件创建时间 • modificationDate –文件最近修改时间 • type –文件的扩展名 response: 服务器回调的数据 data: • fileCount – The total number of files left in the queue • speed – 平均上传速度 KB/s 如: onComplete: function(event, queueID, fileObj) { alert(“文件:” +fileObj.name + “上传失败”); } |
| 27 | onSelectOnce | 函数:可传递二个参数
event: The event object. data: An object containing details about the select operation. • fileCount – The total number of files in the queue • filesSelected – The number of files selected in the select operation • filesReplaced – The number of files that were replaced in the queue • allBytesTotal – The total number of bytes for all files in the queue |
| 28 | onCancel | 函数:可传递四个参数
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. • name – The name of the file • size – The size in bytes of the file • creationDate – The date the file was created • modificationDate – The last date the file was modified • type – The file extension beginning with a ‘.’ data: Details about the file queue. • fileCount – The total number of files left in the queue • allBytesTotal – The total number of bytes left for all files in the queue |
| 29 | onClearQueue | 函数:可传递一个参数
event: The event object. |
| 30 | onQueueFull | 函数:可传递二个参数
• event – The event object. • queueSizeLimit – The maximum size of the queue. |
| 31 | onError | 函数:可传递四个参数
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. • name – The name of the file • size – The size in bytes of the file • creationDate – The date the file was created • modificationDate – The last date the file was modified • type – The file extension beginning with a ‘.’ errorObj: An object containing details about the error returned. • type – Either ‘HTTP’, ‘IO’, or ‘Security’ • info – An error message describing the type of error returned |
| 32 | onOpen | 函数:可传递三个参数
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. • name – The name of the file • size – The size in bytes of the file • creationDate – The date the file was created • modificationDate – The last date the file was modified • type – The file extension beginning with a ‘.’ |
| 33 | onProgress | 函数:可传递四个参数
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. • name – The name of the file • size – The size in bytes of the file • creationDate – The date the file was created • modificationDate – The last date the file was modified • type – The file extension beginning with a ‘.’ data: An object containing details about the upload and queue. • percentage – The current percentage completed for the upload • bytesLoaded – The current amount of bytes uploaded • allBytesLoaded – The current amount of bytes loaded for all files in the queue • speed – The current upload speed in KB/s |
| 34 | onSelect | 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. • name – The name of the file • size – The size in bytes of the file • creationDate – The date the file was created • modificationDate – The last date the file was modified • type – The file extension beginning with a ‘.’ |
| 35 | onAllComplete | 函数:可传递二个参数
event: The event object. data: An object containing details about the upload process. • filesUploaded – The total number of files uploaded • errors – The total number of errors while uploading • allbytesLoaded – The total number of bytes uploaded • speed – The average speed of all uploaded files |
| 36 | onCheck | 函数:可传递五个参数
event: The event object. checkScript: The path to the file checking script. fileQueue: A file queue object consisting of key/value pairs with the queue ID as the key and the filename as the value. folder: The path to the upload folder. single: True if only one file is being uploaded from the queue. |
Jquery Uploadify使用参数详解的更多相关文章
- Jquery使用ajax参数详解
记录一下 Jquery使用ajax(post.get及参数详解) 1.get: $.ajax({ type: "GET", url: baseUrl + "Showco ...
- jquery图片切换插件jquery.cycle.js参数详解
转自:国人的力量 blog.163.com/xz551@126/blog/static/821257972012101541835491/ 自从使用了jquery.cycle.js,我觉得再也不用自己 ...
- Jquery中 $.Ajax() 参数详解
1.url:要求为String类型的参数,(默认为当前页地址)发送请求的地址. 2.type:要求为String类型的参数,请求方式(post或get)默认为get.注意其他http请求方法,例如pu ...
- Uploadify参数详解
属性 $('#file_upload').uploadify({ //一属性详解 id: jQuery(this).attr('id'),//绑定的input的ID la ...
- 【Jquery系列】JqGrid参数详解
1 概述 本篇文章主要与大家分享JqGrid插件参数问题. 2 参数详解 2.1 初始化参数 2.2 ColModel参数 3 json数据 jqGrid可支持的数据类型:xml.jso ...
- ajax方法参数详解与$.each()和jquery里面each方法的区别
JQuery中$.ajax()方法参数详解 url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. type: 要求为String类型的参数,请求方式(post或get)默认为g ...
- jQuery Validate验证框架详解
转自:http://www.cnblogs.com/linjiqin/p/3431835.html jQuery校验官网地址:http://bassistance.de/jquery-plugins/ ...
- $.ajax()方法所有参数详解;$.get(),$.post(),$.getJSON(),$.ajax()详解
[一]$.ajax()所有参数详解 url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. type: 要求为String类型的参数,请求方式(post或get)默认为get.注 ...
- 【转】jqGrid 各种参数 详解
[原文]http://www.cnblogs.com/younggun/archive/2012/08/27/2657922.htmljqGrid 各种参数 详解 JQGrid JQGrid是一个 ...
随机推荐
- selenium测试(Java)--浏览器控制(四)
1. 控制浏览器窗口大小 1 package com.test.window; 2 3 import org.openqa.selenium.Dimension; 4 import org.openq ...
- RL Problems
1.Delayed, sparse reward(feedback), Long-term planning Hierarchical Deep Reinforcement Learning, Sub ...
- QHeaderView的点击和双击事件
QTablewidget的horizontalHeader() 和 verticalHeader() 得到的表头:QHeaderView 点击事件的触发函数: sectionClicked(int) ...
- FusionMap 检测融合基因
定义:融合基因是指两个或者多个基因联合起来,一起转录形成一个转录本: 检测的意义:融合基因可以作为某些疾病的特异分子标记,比如 bcr/abl融合基因存在于95%以上的慢性粒细胞白血病患者中: AML ...
- wcf实体和ef实体冲突。。。
指定的架构无效.错误: CLR 类型到 EDM 类型的映射不明确,因为多个 CLR 类型与 EDM 类型“agentinfo”匹配.以前找到的是 CLR 类型“chanchengFlow.Models ...
- JavaSE(八)集合之Set
今天这一篇把之前没有搞懂的TreeSet中的比较搞得非常的清楚,也懂得了它的底层实现.希望博友提意见! 一.Set接口 1.1.Set集合概述 Set集合:它类似于一个罐子,程序可以依次把多个对象 “ ...
- Windows下基于eclipse的Storm应用开发与调试
原创文章,转载请注明: 转载自http://www.cnblogs.com/tovin/p/3971113.html 本文以一个简单的example来讲解如何开发storm应用程序 1.创建maven ...
- strusts annotation
也叫Zero Configuration(零配置),它省去了写xml文件的麻烦,可以直接在类叫进行配置,不用在java文件和xml文件中来回切换. 1.Action级的注解 @ParentPackag ...
- 利用JQuery直接调用asp.net后台的简单方法
利用JQuery的$.ajax()可以很方便的调用asp.net的后台方法. [WebMethod] 命名空间 1.无参数的方法调用, 注意:1.方法一定要静态方法,而且要有[WebMethod] ...
- 简易2D横版RPG游戏制作
Unity学习笔记1 简易2D横版RPG游戏制作 http://m.blog.csdn.net/article/details?id=24601905