页面点击预览按钮弹出图片窗口

jsp:

...


js:
function imageView(path){
var random = parseInt(Math.random()*10000+1);
$.ajax({
url : jsPath + '/business/system/getImageInfo.do',
type : "POST",
dataType : "json",
data : {path:path},
success : function(data, textStatus) {
path = path+"?random="+random;
var width = 0;
var height = 0;
if(data != null && data != ''){
width = data.width;
height = data.height;
}
if(width == 0 || height==0){
top.Dialog.alert("\u56fe\u7247\u4e0d\u5b58\u5728!",null,250,80,null);
}else{
top.Dialog.open({
InnerHtml: "",
Title:"\u56fe\u7247\u9884\u89c8",
Width:width,
Height:height
});
}
}
});
}

你可能感兴趣的:(页面点击预览按钮弹出图片窗口)