积极答复者
跳转页面window.setTimeout("window.location='show.aspx'",1000)无效??

问题
-
跳转页面就用window.setTimeout("window.location='show.aspx'",1000)
提示我 没有找到window这个名称?是不是要 前面 写什么东西呢?我是直接写到page_load里的···
protected void Page_Load(object sender, EventArgs e)
{
window.setTimeout("window.location='show.aspx'",1000)
}- 已移动 Sheng Jiang 蒋晟 2010年1月23日 17:30 非System.Web (发件人:ASP.NET 与 AJAX)
答案
-
<!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> <meta http-equiv="refresh" content="1;URL=http://www.163.com" /> </head> <body> <div> </div> </body> </html>
您好。
要实现您的需求,不必用到js,请试试上面的代码- 已标记为答案 Jan coki 2010年1月21日 3:25
全部回复
-
开心 这个 还是 不能使用 。。没有跳转到manage的页面。。 这个'manage.aspx' 在aaa文件夹里的··这个表 也在这个文件夹里··
我 写成
head runat="server">
<title>无标题页</title>
<script language="javascript">function sett()
{
window.setTimeout("window.location='manage.aspx'",100)}
</script></head>
<body>
<div>
</div>
</form>
</body>
</html> -
<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>无标题页</title> <script language="javascript"> function sett() { window.setTimeout("window.location='aaa/Default.aspx'",1000) } </script> </head> <body> <form id="form1" runat="server"> <div> dfgfgfggf </div> <input id="Button1" type="button" value="button" onclick="sett();" /> </form> </body> </html>
努力+方法=成功 -
<!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> <meta http-equiv="refresh" content="1;URL=http://www.163.com" /> </head> <body> <div> </div> </body> </html>
您好。
要实现您的需求,不必用到js,请试试上面的代码- 已标记为答案 Jan coki 2010年1月21日 3:25
-
refresh 属性值 -- 刷新与跳转(重定向)页面
- refresh用于刷新与跳转(重定向)页面
- refresh出现在http-equiv属性中,使用content属性表示刷新或跳转的开始时间与跳转的网址
- 引用网址:http://www.xxx.com/xhtml/refresh/
refresh示例
5秒之后刷新本页面:
<meta
http-equiv
=
"refresh"
content
=
"5"
/>
5秒之后转到xxx首页:
学习到了···谢谢啊 ···<meta
http-equiv
=
"refresh"
content
=
"5; url=http://www.xxx.com/"
/>