uploadify上传图片
2013-01-22 14:37
120 查看
<input type="file" id="upload-button"> <div id="upload-info"></div>
事件绑定:
$('#upload-button').uploadify({ 'width': '265', 'height': '65', 'buttonText': '上传图片', 'auto': true, 'successTimeout': 99999, //失效时间 'swf': 'js/lib/uploadify/uploadify.swf', //falsh上传图片 //'queueID': 'upload-info', //文件选择后页面显示的标签ID 'uploader': 'js/lib/uploadify/uploadify.php', //上传处理,连接后台 'multi': false, 'fileTypeDesc': 'Supported File Format', //文件类型描述 'fileTypeExts': '*.jpg;*.jpge;*.gif;*.png', //上传文件类型 'fileSizeLimit': '3MB', 'formData': {id: 1}, //提交数据 'fileObjName': 'file' //后台接收文对象名,和后台保持一致,不写会有默认的文件名 'onSelect': function(file) {//TODO: //file选择后触发 console.log('onSelect', file); }, 'onSelectError': function(file, errorCode, errorMsg){//TODO: //file选择失败后触发 console.log('onSelectError', errorCode); }, 'onFallback': function(){//TODO: //falsh报错是触发 console.log('onFallback'); }, 'onUploadSuccess': function(file, data, response){//TODO: 上传成功后触发 console.log('onUploadSuccess', data); } });
相关文章推荐
- 解决uploadify上传图片session的问题,thinkphp
- JQuery批量图片上传插件—Uploadify
- uploadify批量上传图片
- Bootstrap框架----单张图片上传实现---Uploadify插件
- java uploadify上传图片并预览
- uploadify 上传图片附件问题
- uploadify插件实现多个图片上传并预览
- uploadify 图片上传
- 使用Uploadify实现上传图片生成缩略图例子,实时显示进度条
- 【文件上传】uploadify插件配合java的使用,可以图片,按照步骤可以复制粘贴直接运行,2017年
- 上传图片插件之---uploadify
- 基于Jquery插件Uploadify实现实时显示进度条上传图片
- Uploadify异步上传图片
- jquery uploadify简单图片上传
- uploadify结合ThinkPHP5上传类实现异步上传图片
- PHP Uploadify图片上传裁剪
- Uploadify 控件上传图片 + 预览
- uploadify图片上传插件使用实例
- Uploadify多上传图片插件
- uploadify(jquery)插件的使用及图片上传预览