Get the App
SLTechnology News&Howtos  ›  Development  › 

How to delay Jump in javascript

Shulou Source: shulou.com Published: 2022-06-03 15:48:45 11月14日 Update

Today, I will talk to you about how to delay the jump in javascript. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

1. You can use the setTimeout () function with the "location.href" attribute to achieve delayed jump.

2. Syntax "setTimeout (function () {_ window.location.href=' jump address';}, delay milliseconds);".

Example

JavaScript

Jump after 5 seconds

Function jump () {_ window.location.href=' http://www.baidu.com/';}setTimeout(jump,5000); after reading the above, do you have any further understanding of how to delay the jump in javascript? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Tags: Delay content function address instance property more knowledge article industry grammar information information channel channel enter one support related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Shulou Information MariaDB Huawei macOS