1.使用scriptData给后台传参数的时候,必须声明'method': 'GET',因为默认是POST
2.$("#uploadify").uploadifySettings('scriptData',{'name':'liudong','age':22});动态更新配置参数
$("#uploadify").uploadify ({
'uploader' : uploadify.swf',
'script' : '../upload/doUpload.jsp',
'scriptData' : {'name':'liudong','age': 20},
'method' : 'GET',
'onSelect' : function (event, queueID, fileObj){
$("#uploadify").uploadifySettings('scriptData',{'name':getName(),'age':getAge()});
}
});
或者在成功执行后的方法onComplete中动态设置参数:
onComplete: function (event, queueID, fileObj, response, data) {
var value = response ;
$("#uploadify").uploadifySettings('scriptData',{'name':'liudong','age':value}); }
标签:jquery,name,age,uploadifySettings,liudong,scriptData,uploadify From: https://blog.51cto.com/u_3177799/7806665