最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

ajaxFileUpload.js插件支持多文件上傳的方法

 更新時(shí)間:2014年09月02日 15:21:59   投稿:whsnow  
這篇文章主要介紹了ajaxFileUpload.js插件支持多文件上傳的方法,需要的朋友可以參考下

前提條件:

ajaxFileUpload.js插件多文件上傳

步驟:

1、修改源碼,(源碼只支持單個(gè)文件的上傳):

復(fù)制代碼 代碼如下:

//修改前代碼-------
//var oldElement = jQuery('#' + fileElementId);
//var newElement = jQuery(oldElement).clone();
//jQuery(oldElement).attr('id', fileId);
//jQuery(oldElement).before(newElement);
//jQuery(oldElement).appendTo(form);
//修改前代碼-------
//修改后代碼-------
for(var i in fileElementId){
var oldElement = jQuery('#' + fileElementId[i]);
var newElement = jQuery(oldElement).clone();
jQuery(oldElement).attr('id', fileId);
jQuery(oldElement).before(newElement);
jQuery(oldElement).appendTo(form);
}
//修改后代碼-------

2、使用方法:
復(fù)制代碼 代碼如下:

$.ajaxFileUpload({
url : "./upload/upload.action",
secureuri : false,
//fileElementId:'uploadfile1',//原使用方法
fileElementId : ['uploadfile1','uploadfile2','uploadfile3','uploadfile4','uploadfile5'],//現(xiàn)使用方法
dataType : 'json',
success : function(data) {
ajaxLoadEnd();
if (data.result == "success") {
$.messager.alert('信息','導(dǎo)入成功。','info');
} else {
$('#import_right').dialog('open');
$.messager.alert('信息','導(dǎo)入失敗。<br>錯(cuò)誤信息:'+data.message,'error');
}
},
error : function(data, status, e)
{
ajaxLoadEnd();
$.messager.alert('信息','導(dǎo)入失敗。<br>錯(cuò)誤信息:網(wǎng)絡(luò)異常或表單數(shù)據(jù)錯(cuò)誤。','error');
}
});

相關(guān)文章

最新評論

珲春市| 宜兴市| 汕尾市| 华蓥市| 定边县| 海城市| 静安区| 南澳县| 彰化县| 旅游| 鄂州市| 毕节市| 阿坝县| 新邵县| 汾西县| 安龙县| 廊坊市| 高碑店市| 胶南市| 丰台区| 吉林市| 蒲城县| 七台河市| 衡阳市| 萨嘎县| 西和县| 寻甸| 通海县| 民乐县| 施秉县| 河津市| 怀宁县| 锦州市| 突泉县| 钟祥市| 武乡县| 扎兰屯市| 新乡县| 梁河县| 穆棱市| 东乡县|