这是我最近的任务挑战.我还没有想出最好的方法,也许别人有个主意.
使用PHP和/或HTML,创建一个以给定间隔循环任意数量的其他页面的页面.
例如,我们将加载此页面,它将需要我们谷歌20秒,然后到雅虎10秒,然后到堆栈溢出180秒等等.
Dashboard Examplebody, html { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
iframe { border: none; }
var Dash = {
nextIndex: 0,
dashboards: [
{url: "http://www.google.com", time: 5},
{url: "http://www.yahoo.com", time: 10},
{url: "http://www.stackoverflow.com", time: 15}
],
display: function()
{
var dashboard = Dash.dashboards[Dash.nextIndex];
frames["displayArea"].location.href = dashboard.url;
Dash.nextIndex = (Dash.nextIndex + 1) % Dash.dashboards.length;
setTimeout(Dash.display, dashboard.time * 1000);
}
};
window.onload = Dash.display;