Home > Web Front-end > JS Tutorial > body text

JavaScript page jump technology

高洛峰
Release: 2016-11-26 13:43:34
Original
1420 people have browsed it

Today I learned a new technology while watching the video learning, that is, when we usually click "Submit" or "Confirm" on a page, it will automatically jump to a page. , Search online. Regarding this technical processing, there are many ways to deal with it, I only write down the three types I learned in the video:
1. Use a response.sendredirect Jump directly;
2. Sometimes we need some prompts, such as "Automatically jump after x seconds, if there is no jump, please click here", you can call the Delay Go To URL in Snippets in myeclipse. It will be automatically generated The following code:
[html]



Modify this code to:
[html] view plaincopy

                                                                                                                                                                                                                                                 Then it will jump directly to the "target page" after 3 seconds. This method is to set a few seconds to jump and the page will not change during this process. For example, set it to 3 seconds, and then as time changes, 3 turns to 2 and then to 1 until it jumps. Please follow Look at the third method.
3. Modify the code in method 2 to:
[html]

3
It will automatically jump after 2 seconds, if Do not jump, please click the link below

This method achieves the effect of jumping to this page after clicking submit on the previous page. After 3 seconds (this 3 will decrease to 0), it will jump to the target page.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template