Skip to content Skip to sidebar Skip to footer

How To Redirect To Another Page?

This is my javascript function and I want to redirect to another page on success of this event so how can I do it? window.onbeforeunload = function (e) { e = e || window.event;

Solution 1:

Did you tried this

window.location.href = 'http://redirecttourl.com'

Solution 2:

Just change your location :

window.location = 'http://stackoverflow.com';

Post a Comment for "How To Redirect To Another Page?"