关于jquery文件上传插件 uploadify 3.1的使用
要使用uplaodify3.1,自然要下载相应的包,下载地址http://www.uploadify.com/download/,这里有两种包,一个是基于flash,免费的,一个是基于html5,需要付费,我这里所说的也是前一种。当然现在可能已经不再是3.1版本了,估计是3.2了。不过,差别不会太大!
首先在页面中引入一下文件:
<link rel="stylesheet" type="text/css" href="css/uploadify.css">
<script type="text/javascript" src="js/jquery-1.4.4.js"></script>
<script type="text/javascript" src="js/jquery.uploadify-3.1.js"></script>
<script type="text/javascript" src="js/jquery.uploadify-3.1.min.js"></script>
uploadify.swf要和css放在一起,不然会找不到。
jsp页面里:
<input type="file" name="uploadify" id="uploadify" value="浏览"/>
<div id="fileQueue" style="border-top: thin solid gray;"></div>
一下是我自己的页面的代码:
<script type="text/javascript">
$('#rightFrame').load(function(){
var account = $("#account").val();
var id= $("#userId").val();
var currentNode=0;
$("#uploadify").uploadify({
//注:这里uploadify为html标签,文件输入框id
swf: 'css/uploadify.swf',
uploader: 'uploadfile.action;',
cancelImg: '/images/uploadify-cancel.png',
buttonText:'选择文件',
fileObjName :'uploadify',
auto: true,
multi:true,
Debug:true,
queueID:'fileQueue',//这里fileQueue 为上传进度条显示在哪个div里
formData:{'account':account,'id':id,'currentNode':$("#rightFrame").contents().find("#test").val()},
removeCompleted:true,
queueSizeLimit:999,
fileSizeLimit:'100MB',
height:28,
width:90,
successTimeout:28,
requeueErrors:true,
uploadLimit:5,
onUploadSuccess: function (file, data, response) {
if(response)
{
currentNode=data;
}
},
onQueueComplete : function(stats){
window.parent.rightFrame.location.href="fileaction?filenode="+currentNode;
alert("上传完毕");
}
});
});
</script>
属性解释:
http://blog.sina.com.cn/s/blog_6d34781a01018149.html
关于jquery文件上传插件 uploadify 3.1的使用的更多相关文章
- 强大的支持多文件上传的jQuery文件上传插件Uploadify
支持多文件上传的jQuery文件上传插件Uploadify,目前此插件有两种版本即Flash版本和HTML5版本,对于HTML5版本会比较好的支持手机浏览器,避免苹果手机Safari浏览器不支持Fla ...
- jQuery文件上传插件Uploadify(转)
一款基于flash的文件上传,有进度条和支持大文件上传,且可以多文件上传队列. 这款在flash的基础上增加了html5的支持,所以在移动端也可以使用. 由于官方提供的版本是flash免费,html5 ...
- JQuery文件上传插件uploadify在MVC中Session丢失的解决方案
<script type="text/javascript"> var auth = "@(Request.Cookies[FormsAuthenticati ...
- 关于jquery文件上传插件 uploadify 3.1的使用
要使用uplaodify3.1,自然要下载相应的包,下载地址http://www.uploadify.com/download/,这里有两种包,一个是基于flash,免费的,一个是基于html5,需要 ...
- jQuery文件上传插件uploadify
官方网站:http://www.uploadify.com/ 参考博客:jQuery Uploadify在ASP.NET MVC3中的使用 参考博客:使用uploadify上传图片时返回“Cannot ...
- jQuery 文件上传插件:uploadify、swfupload
jQuery 文件上传插件: uploadify.swfupload
- 20款最好的jQuery文件上传插件
当它是关于开发网络应用程序和网页的时候,文件上传功能的重要性是不容忽视的.一个文件上传功能可以让你上传所有类型的文件在网站上,包括视频,图像,文件和更多.创建一个文件上传功能,对你的网站是不是很难,有 ...
- jQuery文件上传插件jQuery Upload File 有上传进度条
jQuery文件上传插件jQuery Upload File 有上传进度条 jQuery文件上传插件jQuery Upload File,插件使用简单,支持单文件和多文件上传,支持文件拖拽上传,有进度 ...
- JQuery文件上传插件JQuery.upload.js的用法简介
JQuery文件上传插件,这个插件很小,用法很简单,效果却很棒.注意:JQuery版本要求1.8及以上,大家执行如果没效果,则检查JQuery版本,如果是1.8及以上,则该插件源码中的.size()需 ...
随机推荐
- ridis 集群配置
./redis-cli -h 192.168.106.128 -p 6379 redis 1.ping 2.set str1 abc get str1 3. mkdir ../redis-c ...
- Codeforces Round #449
960 asteri 1384 492 00:04 -1 892 01:33 960 PEPElotas 1384 488 00:06 896 00:26 960 ...
- 错误:android.util.SuperNotCalledException
android.util.SuperNotCalledException: Activity {…….YouTubePlayActivity} did not call through to supe ...
- 【Oracle】使用logmnr挖掘日志
使用Logmnr挖掘日志的详细步骤如下: 1. 查看日志状态及位置 col member for a45 select group#,status from v$log; select group#, ...
- linux抓包命令-tcpdump命令详解
最近调试支付接口的时候,遇到了一个奇怪的问题:我按照支付接口文档,对接支付通道,当消费业务正常后,调试查余和冲正的时候,支付通道的对接技术告诉我,系统没有我们支付系统的请求报文,数据库和日志中都没有, ...
- QT与openCV,与PCL结合!
(1):详解QT多媒体框架:给予视频播放器 原文链接:http://mobile.51cto.com/symbian-271123.htm 对于使用主框架的QT程序,实现Qimage的转换可借鉴下面程 ...
- JS 输名字随机弹出
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- &:first-of-type含义
span { &:first-of-type { margin-right: 16px; } } &符号是scss和less里的语法,代表上一级选择器,实际编译成css就是 span: ...
- Linux下挂载分区 (本人实例)
设置分区开机自动挂载 要在/etc/fstab里设置一行 把上面空格去掉就行了
- web内置对象
内置对象,宿主对象,自定义对象的区别? 内置对象: 系统所提供的对象:Object,Array,Math,Date等等. 宿主对象: JS所运行的环境提 ...