I need to redirect a page using JS and I wonder how to do that? Assume I have following URL already opened in the browser which has few anchor tags,
file:///someDrive:/someFolder/index.html
One of anchor tag has onclick set to redirect('login.html'); and when I press it it should redirect to,
file:///someDrive:/someFolder/login.html
How?
If you really want to have a JavaScript function, you can do:
Still, for normal links, you don’t need this, setting the correct
hrefattribute is sufficient. Also, if you don’t have a form, I would not use<input type="button" />but just<button>(docu).