您现在的位置: 万盛学电脑网 >> 程序编程 >> 脚本专题 >> javascript >> 正文

jquery uploadify 在FF下无效的解决办法

作者:佚名    责任编辑:admin    更新时间:2022-06-22

 Js代码

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 $('#file_upload').uploadify({  buttonImage: '${ctx }/commons/uploaddify/img/browse-btn.png',  swf :'${ctx }/commons/uploaddify/uploadify.swf',  uploader :'../servlet/defaultDispatcher;jsessionid=${pageContext.session.id}?__action=xxx',  fileTypeExts: '*.jpg;*.png;*.gif;*.bmp',  fileTypeDesc: '图像文件',  formData: {  timestamp: new Date().getTime()  },  onSelect: function(file){  //重写校验  },  onUploadProgress: function(file,bytesUploaded,bytesTotal,totalBytesUploaded,totalBytesTotal){  $('#pregress').html('总共需要上传'+bytesTotal+'字节,'+'已上传'+totalBytesTotal+'字节');  },  onUploadSuccess: function(file){  //上传成功  }  });

参考网上解决方案,在uploader路径后面增加jsessionId就好。