定时刷新局部页面_用js实现 iframe几秒后刷新

管理员 发布于 6年前   365
html:
<div class="ss_da">
   <div class="ss_shang">
       <iframe src="你的url" width="400" id="zhuce_ls" height="100" frameborder="no" 
          border="0" marginwidth="0" marginheight="0" scrolling="no" 
          allowtransparency="yes">
       </iframe>
   </div>
   <div class="ss_zhong">
        <iframe src="你的url" width="400" id="zhuce_jz" height="100" frameborder="no" 
            border="0" marginwidth="0" marginheight="0" scrolling="no" 
            allowtransparency="yes">
        </iframe>
   </div>
   <div class="ss_xia">
        <iframe src="你的url" width="800" id="order_yuyue" height="100" frameborder="no" 
            border="0" marginwidth="0" marginheight="0" scrolling="no" 
            allowtransparency="yes">
        </iframe>
   </div>
</div>
js:
<script language="javascript">

    function changeSource()
    {
       document.getElementById("zhuce_ls").src="你的url"
    }
    setInterval("changeSource()",60000);

    function changeSource_a()
    {
       document.getElementById("zhuce_jz").src="你的url"
    }
    setInterval("changeSource_a()",60000);

    function changeSource_b()
    {
       document.getElementById("order_yuyue").src="你的url"
    }
    setInterval("changeSource_b()",60000);
</script>
注意:对应好你的url就ok了


请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!

该博客于2020-12-7日,后端基于go语言的beego框架开发
前端页面使用Bootstrap可视化布局系统自动生成

是我仿的原来我的TP5框架写的博客,比较粗糙,底下是入口
侯体宗的博客

      订阅博客周刊

文章标签

友情链接

HouTiZong
侯体宗的博客
© 2020 zongscan.com
版权所有ICP证 : 粤ICP备20027696号
PHP交流群
侯体宗的博客