没反应 就我知道有3种情况
1)swf路径不对
2)width 宽度没设置
3)dialog 对话框不兼容(改用IFrame)
例子
$('#add_file').uploadify({
'auto' : false,
'debug' : true, //debug
'swf' : 'js/uploadify.swf',
'fileSizeLimit' : "4096KB",大小限制
//'multi': true,
'buttonClass' : 'ui-button ui-widget ui-state-default ui-corner-all',
'width': '100%',//buttonImg的大小
//'height': 30,//
'formData' : { /// 连同file一同post
'id' : 1
},
'uploader' : 'upload.php',
//'removeCompleted' : false,
'buttonText' : '浏览文件,不要超过4M',
'onError' : function(event,ID,fileObj,data) {
$.alert('The upload of ' + fileObj.name + 'Size:'+fileObj.size + ' has been canceled!');
$('#add_file').uploadify('cancel');
},
'onUploadSuccess' : function (file,data,response) {
//$("#add_new").dialog( "close" );
//var i = Math.random();
alert(data);
}
});