js 回调
来源:互联网 发布:mac上铃声软件 编辑:程序博客网 时间:2024/05/19 01:11
//根据单子id查询所有图片
function queryPhotoByMainId(mainId,showMinusOrNot){
showMinus=showMinusOrNot;
var jsonData = "{" + "\"mainId" + "\":" + "\"" + mainId+"\"" +"}";
searchPictures(photoSaveUrl,jsonData,afterQueryComplete);
}
//查询单子id成功后的回调函数
function afterQueryComplete(photoInformation){
var c = $("#zgzc-photo-container");
c.html("");
var photoStr="";
if(photoInformation.statusCode=="200"){
var difStr="";
if(showMinus==1){
difStr="<span class="+"\"d"+"\""+ " onclick="+"\"deletePhotoById(this) "+"\">"+"—</span></li>";
}else{
difStr="</li>";
}
$("#showOnePic img").attr("src",photoSaveUrl+photoInformation.pictureList[0].fileUrl);
$("#showOnePic img").attr("class",photoInformation.pictureList[0].fileId);
$("#showOnePic p").text(photoInformation.pictureList[0].fileName);
$.each(photoInformation.pictureList, function(i, item) {
photoStr="<li><img id="+"\""+item.fileId+"\""+
" src="+"\""+photoSaveUrl+item.fileUrl+"\"" +"class="+"\""+item.fileName+"\"" +"onclick="+"\"showThePhoto(this)"+"\"" +"style="+"\"max-width: 100%; max-height: 100%; vertical-align: middle;"+"\""
+"/>"+"<p>"+item.fileName+"</p>";
photoStr+=difStr;
c.append(photoStr);
});
}
}
function queryPhotoByMainId(mainId,showMinusOrNot){
showMinus=showMinusOrNot;
var jsonData = "{" + "\"mainId" + "\":" + "\"" + mainId+"\"" +"}";
searchPictures(photoSaveUrl,jsonData,afterQueryComplete);
}
//查询单子id成功后的回调函数
function afterQueryComplete(photoInformation){
var c = $("#zgzc-photo-container");
c.html("");
var photoStr="";
if(photoInformation.statusCode=="200"){
var difStr="";
if(showMinus==1){
difStr="<span class="+"\"d"+"\""+ " onclick="+"\"deletePhotoById(this) "+"\">"+"—</span></li>";
}else{
difStr="</li>";
}
$("#showOnePic img").attr("src",photoSaveUrl+photoInformation.pictureList[0].fileUrl);
$("#showOnePic img").attr("class",photoInformation.pictureList[0].fileId);
$("#showOnePic p").text(photoInformation.pictureList[0].fileName);
$.each(photoInformation.pictureList, function(i, item) {
photoStr="<li><img id="+"\""+item.fileId+"\""+
" src="+"\""+photoSaveUrl+item.fileUrl+"\"" +"class="+"\""+item.fileName+"\"" +"onclick="+"\"showThePhoto(this)"+"\"" +"style="+"\"max-width: 100%; max-height: 100%; vertical-align: middle;"+"\""
+"/>"+"<p>"+item.fileName+"</p>";
photoStr+=difStr;
c.append(photoStr);
});
}
}
阅读全文
0 0
- js回调
- js 回调
- js 回调
- js回调
- js 回调
- js 回调
- Android调用JS && JS回调Android原生
- 回调js方法
- JS 回调(CallBack)
- JS 回调(CallBack)
- JS 回调(CallBack)
- JS replace 回调
- JS 回调(CallBack)
- js 回调(callback)
- node.js 回调
- echart require js 回调
- node.js回调
- js
- 加油!
- HDU 1730 Northcott Game (Nim博弈)
- OpenCV基础——threshold函数的使用
- COJ-1216 异或最大值
- 基于Spring的AOP实现自定义annotation操作日志
- js 回调
- 并查集
- UVA 208 Firetruck
- Re:从零开始的Spring Security Oauth2(三)
- 人脸识别demo
- HDU 2243 AC自动机+矩阵快速幂
- LESS 学习demo
- JavaSpider学习
- VS2015动态库编程提高篇之远程注入资源汇总