using js and html I want to click on a button for example 'login' and when I click it I want it to redirect me to an another page. How can I do that?
Asked
Active
Viewed 69 times
0
-
1hi, check here. https://stackoverflow.com/q/503093/14032355 – ikhvjs Jun 08 '21 at 15:09
-
1Does this answer your question? [How do I redirect to another webpage?](https://stackoverflow.com/questions/503093/how-do-i-redirect-to-another-webpage) – deepakchethan Jun 08 '21 at 15:11
1 Answers
0
- You can wrap the button with the
<a>
tag in case you want to use normal HTML - Otherwise, you can use `window.location.href = 'redirect page`` for navigate with JavaScript

Heretic Monkey
- 11,687
- 7
- 53
- 122

Khanh Chau
- 121
- 1
-
2
-
yes I know that but when I click the button 'login' does not redirect me to the another page – John Jun 08 '21 at 15:31