Home > Backend Development > PHP Tutorial > 【求助】在网页中,设置多个iframe下执行任务,遇到的问题?

【求助】在网页中,设置多个iframe下执行任务,遇到的问题?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:10:26
Original
1016 people have browsed it

【求助】在网页中,设置多个iframe下执行任务,遇到的问题?
情况如下:
本地网页地址为:http://127.0.0.1/index.php
index.php设置了多个iframe来执行任务,

<code>echo "<iframe frameborder="0" height="35" scrolling="no" src="%5C%22/index.php?action=one&id=0%5C%22" width="100%"></iframe>";
echo "<iframe frameborder="0" height="35" scrolling="no" src="%5C%22/index.php?action=two&id=0%5C%22" width="100%"></iframe>";
echo "<iframe frameborder="0" height="35" scrolling="no" src="%5C%22/index.php?action=three&id=0%5C%22" width="100%"></iframe>";</code>
Copy after login
Copy after login

多个iframe地址为执行不同类别的相同任务!
**遇到的问题就是:
任务都是一秒,一个iframe运行一下,再一下,下一个iframe再执行一下,并不是多个iframe同时执行的!**

<code>第一秒
one 1/10
tow 1/10
three 1/10</code>
Copy after login
Copy after login
Copy after login
Copy after login
<code>第二秒
one 2/10
tow 1/10
three 1/10</code>
Copy after login
Copy after login
<code>第三秒
one 2/10
tow 2/10
three 1/10</code>
Copy after login
Copy after login
<code>第四秒
one 2/10
tow 2/10
three 2/10</code>
Copy after login
Copy after login
<code>第五秒
one 3/10
tow 2/10
three 2/10</code>
Copy after login
Copy after login

我想要的效果是同时让多个iframe运行

<code>第一秒
one 1/10
tow 1/10
three 1/10</code>
Copy after login
Copy after login
Copy after login
Copy after login
<code>第二秒
one 2/10
tow 2/10
three 2/10</code>
Copy after login
Copy after login
<code>第三秒
one 3/10
tow 3/10
three 3/10</code>
Copy after login
Copy after login
<code>第四秒
one 4/10
tow 4/10
three 4/10</code>
Copy after login
Copy after login
<code>第五秒
one 5/10
tow 5/10
three 5/10</code>
Copy after login
Copy after login

回复内容:

【求助】在网页中,设置多个iframe下执行任务,遇到的问题?
情况如下:
本地网页地址为:http://127.0.0.1/index.php
index.php设置了多个iframe来执行任务,

<code>echo "<iframe frameborder="0" height="35" scrolling="no" src="%5C%22/index.php?action=one&id=0%5C%22" width="100%"></iframe>";
echo "<iframe frameborder="0" height="35" scrolling="no" src="%5C%22/index.php?action=two&id=0%5C%22" width="100%"></iframe>";
echo "<iframe frameborder="0" height="35" scrolling="no" src="%5C%22/index.php?action=three&id=0%5C%22" width="100%"></iframe>";</code>
Copy after login
Copy after login

多个iframe地址为执行不同类别的相同任务!
**遇到的问题就是:
任务都是一秒,一个iframe运行一下,再一下,下一个iframe再执行一下,并不是多个iframe同时执行的!**

<code>第一秒
one 1/10
tow 1/10
three 1/10</code>
Copy after login
Copy after login
Copy after login
Copy after login
<code>第二秒
one 2/10
tow 1/10
three 1/10</code>
Copy after login
Copy after login
<code>第三秒
one 2/10
tow 2/10
three 1/10</code>
Copy after login
Copy after login
<code>第四秒
one 2/10
tow 2/10
three 2/10</code>
Copy after login
Copy after login
<code>第五秒
one 3/10
tow 2/10
three 2/10</code>
Copy after login
Copy after login

我想要的效果是同时让多个iframe运行

<code>第一秒
one 1/10
tow 1/10
three 1/10</code>
Copy after login
Copy after login
Copy after login
Copy after login
<code>第二秒
one 2/10
tow 2/10
three 2/10</code>
Copy after login
Copy after login
<code>第三秒
one 3/10
tow 3/10
three 3/10</code>
Copy after login
Copy after login
<code>第四秒
one 4/10
tow 4/10
three 4/10</code>
Copy after login
Copy after login
<code>第五秒
one 5/10
tow 5/10
three 5/10</code>
Copy after login
Copy after login

用js做延时

执行任务 消息队列 是你需要的

iframe 是一种诡异实现

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template