首頁  >  文章  >  web前端  >  Flash圖片上傳元件 swfupload使用指南_javascript技巧

Flash圖片上傳元件 swfupload使用指南_javascript技巧

WBOY
WBOY原創
2016-05-16 16:09:331010瀏覽

swfupload上傳編輯器是一款支援本地上傳、預覽、影片拍照和網路載入的flash頭像編輯上傳插件,可縮放、裁剪、旋轉、定位和調色等,同時支援asp、asp.net、jsp 、php等多語種

複製程式碼 程式碼如下:

swfobject.addDomLoadEvent(function () {
               var swf = new fullAvatarEditor("swfContainer", {
                       id: 'swf',
                       upload_url: 'asp/Upload.asp',
                       src_upload:2
                   }, function (msg) {
                       switch(msg.code)
                       {
                           case 1: alert("頁面成功載入了元件!");break;
                           case 2 : alert("成功載入預設指定的圖片到編輯面板。");;
;
;
                           case 3 :
                              if(msg.type == 0)
                               {
                                 ,                                }
                               else if(msg.type == 1)
                               {
                                 ,                                }
                               else
                               {
                                 ,                                }
                          break;
                           case 5 :
                              if(msg.type == 0)
                               {
                                  )if(msg.content.sourceUrl)

                                   {
                                 可能和url                                    }
                     會                                }
                          break;
                       }
                   }
               );
               document.getElementById("upload").onclick=function(){
                   swf.call("upload");
               };
           });

示範圖:

以上就是本文關於swfupload的簡單使用範例了,希望對大家能夠有所幫助。

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn