怎樣自動轉向另一個網頁的方法歸納
1 js:<script>
setTimeOut("fnSubmit()","10000");
function fnSubmit()
{
frm.submit();
}
</script>
<form name="frm">
</form>
2
<meta http-equiv="refresh" content="5;URL=index.htm">
5的單位是秒,而不是毫秒(這要注意一下,否則你會填上5000)的
3 <body onload=setTimeout('window.location.href="index.htm"',5000)>
這里面是5000毫秒(5秒)網頁轉向
<body onload…………>和<body window.open…………>的區別是什么?
onload是當頁面加載完成后執行的動作,location.href其實就是self.location.href將當前頁面跳轉,window.open是打開新的窗口