我正在做一个项目,我有 2 个 iframe 显示不同的 url。我需要获取第一个 iframe 并让该页面每 60 秒循环通过 3 或 4 个不同的 URL。因此,例如,它会在 iframe 中显示http://stackoverflow.com 60 秒,然后会显示http://google.com 60 秒,然后是另一个站点,依此类推。以下是我的拆分 iframe 页面的代码:
<%@ Page Title="ALM Dashboard View" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="dashboard.aspx.cs" Inherits="WebApplication1.bookings" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
# This is the frame I need to cycle through multiple sites
<iframe src="https://site1" width="50%" height="1200">
<p>
Your browser does not support Iframes</p>
</iframe>
# This is the static frame
<iframe src="http://site2" width="49%" height="1200">
<p>
Your browser does not support Iframes</p>
</iframe>
</asp:Content>
如何每 60 秒通过一帧循环浏览不同的网址?