I can connect to another html page by using the following code by using a button click.
<form action="where-you-want-to-go"><input type="submit"></form>
but I have a problem. When there are two buttons on the page how can I redirect them to two different pages by using this code? Or is there any other way to do that?
YOU COULD DO something like this
<input type="button" onclick="window.location = 'where-you-want-to-go';">
<input type="button" onclick="window.location = 'where-you-want-to-go';">
What do you mean by "redirect"? After clicking submit button the form data is send to action url. If you want you can create two forms:
<form action="action-first"><input type="submit"></form>
<form action="action-second"><input type="submit"></form>
But if you don't want to send data, you can use links to go to the page:
<a href="/action-first">First link</a>
<a href="/action-second">Second link</a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With