php - 【求助】在网页中,设置多个iframe下执行任务,遇到的问题?
迷茫
迷茫 2017-04-10 17:27:04
[PHP讨论组]

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

echo "<iframe frameborder=0 height=35 scrolling=no src=\"/index.php?action=one&id=0\" width=100%></iframe>";
echo "<iframe frameborder=0 height=35 scrolling=no src=\"/index.php?action=two&id=0\" width=100%></iframe>";
echo "<iframe frameborder=0 height=35 scrolling=no src=\"/index.php?action=three&id=0\" width=100%></iframe>";

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

第一秒
one 1/10
tow 1/10
three 1/10
第二秒
one 2/10
tow 1/10
three 1/10
第三秒
one 2/10
tow 2/10
three 1/10
第四秒
one 2/10
tow 2/10
three 2/10
第五秒
one 3/10
tow 2/10
three 2/10

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

第一秒
one 1/10
tow 1/10
three 1/10
第二秒
one 2/10
tow 2/10
three 2/10
第三秒
one 3/10
tow 3/10
three 3/10
第四秒
one 4/10
tow 4/10
three 4/10
第五秒
one 5/10
tow 5/10
three 5/10
迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

全部回复(2)
怪我咯

用js做延时

怪我咯

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

iframe 是一种诡异实现

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号