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僅適合屏幕圖像的量。