redirect
Redirects the browser to a URL, optionally after a delay.
Returns: void
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
url | `undefined \ | null \ | string \ | false` |
delay | number | optional | 0 | Delay in milliseconds before redirecting. Defaults to 0. |
Usage
Example: Redirect to a URL
const url = "https://www.example.com";
nfsfu234FormValidation.redirect(url); // Redirects immediately to the specified URL
const delayedUrl = "https://www.example.com";
nfsfu234FormValidation.redirect(delayedUrl, 3000); // Redirects to the specified URL after 3 secondsLast updated on