Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/363.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/236.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用javascript并发加载iframe_Javascript_Php_Jquery - Fatal编程技术网

如何使用javascript并发加载iframe

如何使用javascript并发加载iframe,javascript,php,jquery,Javascript,Php,Jquery,如何使用javascript或jquery同时加载iframe? 示例:我有iframe[0]、iframe[1]、iframe[2]、iframe[3],如何同时加载它们?设置它们的src属性: $("iframe").each(function () { $(this).attr("src", ...); }); 设置其src属性: $("iframe").each(function () { $(this).attr("src", ...); }); 设置其src属性: $("

如何使用javascript或jquery同时加载iframe?
示例:我有iframe[0]、iframe[1]、iframe[2]、iframe[3],如何同时加载它们?

设置它们的
src
属性:

$("iframe").each(function () {
  $(this).attr("src", ...);
});

设置其
src
属性:

$("iframe").each(function () {
  $(this).attr("src", ...);
});

设置其
src
属性:

$("iframe").each(function () {
  $(this).attr("src", ...);
});

设置其
src
属性:

$("iframe").each(function () {
  $(this).attr("src", ...);
});

jQuery的使用很好,但是纯JS也可以,即使IE8也支持它

在您的情况下,它将是:

el.setAttribute('src', 'the/path/to/whatever');

jQuery的使用很好,但是纯JS也可以,即使IE8也支持它

在您的情况下,它将是:

el.setAttribute('src', 'the/path/to/whatever');

jQuery的使用很好,但是纯JS也可以,即使IE8也支持它

在您的情况下,它将是:

el.setAttribute('src', 'the/path/to/whatever');

jQuery的使用很好,但是纯JS也可以,即使IE8也支持它

在您的情况下,它将是:

el.setAttribute('src', 'the/path/to/whatever');

这是要更改的属性的占位符。^^我将添加一行更指定的代码以显示正确的用法。这是要更改的属性的占位符。^^我将添加一行更指定的代码以显示正确的用法。这是要更改的属性的占位符。^^I将添加更多指定的代码行以显示正确用法。这是作为您要更改的属性的占位符。^^我将添加更多指定的代码行以显示正确用法。对我的答案有何反馈?对我的答案有何反馈?对我的答案有何反馈?对我的答案有何反馈?