【发布时间】:2014-05-20 05:42:44
【问题描述】:
我已成功从服务器加载图像并将其显示到 div 元素。但我想将图像调整为大。我该怎么做。这是我从服务器加载图像的代码。
var img = $("<img />").attr('src', url)
.load(function() {
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
alert('broken image!');
} else {
$("#image").append(img);
}
});
【问题讨论】:
标签: javascript jquery image