我正在尝试遍历一组 url 以设置为框架的位置。到目前为止,我所拥有的是这个小提琴:
var l = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'10', '11', '12', '13', '14', '15', '16', '17', '18', '19',
'20', '21', '22', '23', '24', '25', '26', '27', '28', '29'];
$(document).ready(function () { // Wait until body is ready to be manipulated
l.forEach(function (query) { // iterate through l
$('#g').on('load', function () { // Wait until #g is loaded
$('#g').attr('location', 'http://www.bing.com/search?q=' + query); // goto Bing search
});
});
});
但是,当我运行它时,结果窗格中没有任何反应。我究竟做错了什么?