0
图像搜索结果我有folloing代码局限于屏幕尺寸
function (data) {
var size = 0;
windowWidth = $(window).width(); //retrieve current window width
windowHeight = $(window).height(); //retrieve current window height
$.each(data.items, function (i, item) {
var y = item.description.search("width");
picWidth = parseInt(item.description.substr(y + 7, 3));
var x = item.description.search("height");
picHeight =parseInt(item.description.substr(x + 8, 3));
$("<img/>").attr("src", item.media.m).prependTo("#results");
});
});
});
如何限制图像搜索的结果,以DISPLY仅适合屏幕图像的量。