我试图在 2 分钟后将页面重定向到主页
我试过使用
<meta http-equiv="REFRESH" content="120;url=http://mysite.com/index.php">
和
<!--
window.setTimeout('window.location="http://mysite.com/index.php"; ',1200000);
// -->
如果我刷新页面,这两种方法都有效 - 如果我不刷新页面,则不会发生任何事情
帮助
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script language="javascript" type="text/javascript">
<!--
window.setTimeout('window.location="mysite.com/index.php"; ',2000);
// -->
</script>
<meta http-equiv="REFRESH" content="120;url=http://mysite.com/index.php">
<title>Patrol Report</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
<style>
table { width:100%; }
table caption { text-align:left; }
table thead th { text-align:left; border-bottom-width:1px; border-top-width:1px; }
table th, td { text-align:left; padding:6px;}
</style>
</head>
<body>
index.php 调用 list.php
src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>Mobile Patrol Report</h1>
</div>
<div data-role="content">
<ul data-role="listview" data-theme="b">
<li><a href="<?php echo HTDOCS_URL; ?>list.php?type=outward">Outward Housing Exemptions</a></li>
<li><a href="<?php echo HTDOCS_URL; ?>list.php?type=newlon">Newlon Exemptions</a></li>
<li><a href="<?php echo HTDOCS_URL; ?>list.php?type=octavia">Octavia Exemptions</a></li>
<li><a href="<?php echo HTDOCS_URL; ?>list.php?type=poplar">Poplar Harca Exemptions</a></li>
<li><a href="<?php echo HTDOCS_URL; ?>list.php?type=stadium">Stadium Exemptions</a></li>
<li><a href="<?php echo HTDOCS_URL; ?>list.php?type=wessex">First Wessex Exemptions</a></li>
<li><a href="<?php echo HTDOCS_URL; ?>list.php?type=christian">Christian Housing Exemptions</a></li>
<li><a href="<?php echo HTDOCS_URL; ?>list.php?type=isha">ISHA Exemptions</a></li>
</ul>
</div>
<div data-role="footer">
<h4>© W8S.co.uk</h4>
</div>
</div>
</body>
</html>
有一些 sql 语句定义了显示的数据