延遲跳轉(比如登陸成功後會有幾秒鐘等待時間,然後跳轉到了其他頁面)header
('location:main.php'
);
或者header
('refresh:3;url=main.php'
);
1.window.location.href方法sleep(3
);header
('location:main.php'
);
2.使用js方法實現延遲跳轉
window.location.href =
'main.php'
;<
/script>
3.window.location.assign方法 延遲跳轉方法同上
settimeout
("window.location.href = 'main.php'"
,3000);
<
/script>
4.window.open方法 三個引數,第乙個url位址。第二個開啟新頁面方式(比如新頁面_blank,_new,自身跳轉_self),第三個是新頁面的方式,包括樣式,位置等。
window.location.assign =
'main.php'
;<
/script>
jsp頁面中實現跳轉的方式
1.每秒遞減跳轉 2.使用response.setheader函式 response.setheader refresh 5 url 3.使用meta標籤 jsp頁面實現自動跳轉!一 頁面自動重新整理 把如下 加入區域中 注 content 5 是時間控制,表示每隔5秒重新整理一次頁面。二 頁面自動...
php 頁面跳轉方式總結
php傳值有兩種 get 和 post 先說get 表單,用get方法傳值給welcome.php 點選傳送時,url會以這種形式表示 http welcome.php?name age welcome.php通過 get 來取得值 welcome echo get name you are ech...
jsp中,實現頁面跳轉的幾種方式
requestdispatcher.forward 是在服務端起作用,當使用forward 時,servlet引擎傳遞http請求 從當前的servlet或者jsp到另外乙個servlet,jsp或者普通的html檔案,即你的表單 form 提交至a.jsp,在a.jsp中用 到了forward 重...