HTML+JS in the web page to jump the way to write
1, html in the use of meta in the jump, through the meta can be set to jump time and page
2, through the javascript in the realization of the jump
// Jump directly
window.location.href='index.html';
// Timed jump
setTimeout("javascript:location.href='index.html'", 5000);
3、html jump to the previous page of the way
window.history.go(-1); or window.history.back(-1);
var wrong = document.getElementById('btn');
wrong.onclick = function() {
window.history.go(-1);//return to previous page
window.history.back(-1);//return to the previous page
}
</script
Write in html
<a href="”#”" onclick="”JavaScript" :history.back(1);”>Back to previous page</a>
<a href="”#”" onclick="”javascript" :history.go(-1);”>Back to previous page</a>
Writing Web Jumps in Js
1,window.location.href
window.location.href="http://www.baidu.com"; //open in original window
2.window.navigate way to jump
window.navigate("http://www.baidu.com");
function toBooks() {
//open in the original window
window.location.href = "http://www.baidu.com"; //open in the original window.
//Open the new window
window.open("http://www.baidu.com");
}
Direct jumps plus parameters
window.location.href="login.jsp?backurl="+window.location.href;
</script
912sy.com download resources are from the network, only for learning and reference use, the copyright belongs to the original author, do not use for commercial purposes, please remove yourself within 24 hours after downloading.
If the content published on this site inadvertently violates your rights and interests, please contact us and the site will be deleted within one business day.If you encounter any problems please contact customer service QQ:2385367137
912sy " HTML+JS in the web page to jump the way to write
If the content published on this site inadvertently violates your rights and interests, please contact us and the site will be deleted within one business day.If you encounter any problems please contact customer service QQ:2385367137
912sy " HTML+JS in the web page to jump the way to write