【发布时间】:2015-06-19 09:29:51
【问题描述】:
我正在做一个项目,我有 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 秒通过一帧循环浏览不同的网址?
【问题讨论】:
-
你的问题是什么?
-
对不起。我想知道如何让一个 iframe 窗口每 x 秒(例如 60 秒)显示一个不同的 URL。我希望这更清楚。谢谢。
标签: c# asp.net iframe navigateurl