Uploadify 上传插件

  

//头像上传 Uploadify 插件
    $('上传文件的Input对象').uploadify({
        swf : PUBLIC + '/Uploadify/uploadify.swf',    //引入Uploadify核心Flash文件
        uploader : 'test.php',    //PHP处理脚本地址
        width : 120,    //上传按钮宽度
        height : 30,    //上传按钮高度
        buttonImage : PUBLIC + '/Uploadify/browse-btn.png',    //上传按钮背景图地址
        fileTypeDesc : 'Image File',    //选择文件提示文字
        fileTypeExts : '*.jpeg; *.jpg; *.png; *.gif',    //允许选择的文件类型
        formData : {'session_id' : sid},
        //上传成功后的回调函数
        onUploadSuccess : function (file, data, response) {
            //file  是上传的文件名
            //data  是返回值
        }
    });

中文帮助文档

posted @ 2014-03-04 14:41  tlijian1989  阅读(194)  评论(0编辑  收藏  举报