$('#file').uploadify({
'swf' : '/uploadfy/uploadify.swf',
'uploader' : '/image/Upload',
'buttonText' : '上传',
'width' : 50,
'height' : 20,
'auto':false,
'onUploadSuccess' : function(file, data, response) {
上传成功后做的操作,比如显示图片
}
'swf' : '/uploadfy/uploadify.swf',
'uploader' : '/image/Upload',
'buttonText' : '上传',
'width' : 50,
'height' : 20,
'auto':false,
'onUploadStart': function (file) {
//传递附加参数的方式如下,传递了两个参数,一个是"myurl",一个是"mytype"
$("#file").uploadify('settings', 'formData', {'myurl' : $('#myurl').val(), 'mytype' : $('#mytype').val()});
},'onUploadSuccess' : function(file, data, response) {
上传成功后做的操作,比如显示图片
}
});
后台通过request.getParameter方法就可以获取到参数的值了,中文的话要注意编码