<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="MenuApplication.WebForm1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
var i = 5;
var redirectUrl = function() {
document.getElementById("time").innerHTML = i + "秒";
if (i == 0) {
window.location.href = 'http://www.baidu.com';
}
else if (i < 0) {
clearInterval(timeId);
}
i--;
}
var timeId = setInterval(redirectUrl, 1000);
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="time" style="font-family: 楷体; font-size: xx-large; color: Red;">
</div>
</form>
</body>
</html>