In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Today Xiaobian to share with you how to achieve timed jump page in javascript related knowledge points, detailed content, clear logic, I believe most people are still too familiar with this knowledge, so share this article for everyone to refer to, I hope you read this article after harvest, let's learn about it together.
In javascript, you can use setTimeout() with the href attribute of the location object to implement the timed jump page function, with the syntax format "setTimeout("_javascript:location.href= jump page address ", milliseconds);".
Operating environment of this tutorial: Windows 7 system, Javascript version 1.8.5, Dell G3 computer.
javascript implementation timing jump page
//5 seconds later jump to setInterval("myInterval()",5000);//1000 is 1 second function myInterval(){ _window.location.href ='/crm/php/mail/editmail.php ';}
Optimization code:
//jump setTimeout("_javascript:location.href='https://www.example.com'", 5000) after five seconds; www.php.cn
Description:
The setTimeout() method is used to invoke a function or evaluate an expression after a specified number of milliseconds. The syntax format is as follows:
setTimeout(code,millisec) Parameter Description code Required. The string of JavaScript code to execute after the function to call. Millisec is required. Number of milliseconds to wait before executing code.
The_window.location.href property is a readable and writable string that sets or returns the full URL of the currently displayed document.
Therefore, we can make the browser read and display the contents of the new URL by setting a new URL for this attribute.
syntax
location.href=URL Above is "How to realize timed jump page in javascript" All the contents of this article, thank you for reading! I believe everyone has a great harvest after reading this article. Xiaobian will update different knowledge for everyone every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.