function previewImg(obj) {        var img = new Image();          img.src = obj.src;        var height = img.height + 50;         var width = img.width;         var imgHtml = "<img src='" + obj.src + "' />";                  layer.open({              type: 1,              shade: 0.8,            offset: 'auto',            area: [width + 'px',height+'px'],            shadeClose:true,            scrollbar: false,            title: "图片预览",             content: imgHtml,             cancel: function () {                              }          });     }
  |