Redirect to url after specific time with javascript

Try this


function RedirectUrl(url, interval) {

if (url!= null && url!= '') {

if (interval != undefined && interval != '') {
window.setTimeout(function () {
window.location.href = url;
}, interval);
} else {
window.location.href = url;
}

}

}

Advertisements

#interval, #javascript-url-redirect, #jquery, #settimeout, #url-redirect