我正在尝试通过一组网址来设置框架的位置。到目前为止,我有什么是this fiddle:在jQuery中更改框架位置
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
});
});
});
当我去运行它,但是,没有任何反应的结果窗格中。我究竟做错了什么?
http://jsfiddle.net/zDCqz/3/ 它与iframe和src attr一起工作。 – jQuery00
如果一个答案适合你,你会介意标记一个作为最终的解决方案吗? – Christian