1、向后台传可变的参数
<input type="file" name="file_upload" id="file_upload" />
$(function(){
$("#file_upload").uploadify({
'formData' :{'someKey':'someValue','someOtherKey':1},
'swf' :'/uploadify/uploadify.swf',
'uploader' :'/uploadify/uploadify.php'
});
});
方法:
使用Method
settings
调后台时写:
$('#file_upload').uploadify('settings','formData',{'someKey':'otherValue','someOtherKey':2});

本文介绍如何使用Uploadify插件实现文件上传功能,并演示了如何向后台传递额外参数。通过设置formData属性,可以轻松地为上传请求添加自定义数据。
4万+

被折叠的 条评论
为什么被折叠?



