Asked
Active
Viewed 5,832 times
0
-
1Possible duplicate of [Open URL in same window and in same tab](https://stackoverflow.com/questions/8454510/open-url-in-same-window-and-in-same-tab) – a stone arachnid Oct 08 '18 at 00:10
3 Answers
1
You can use hyperlink to link once page to another
<a href="register.htm">Button</a>
if you using a <form> you can use form action you can try this.
<form action="http://www.register.htm">
<button type=submit>Register</button>
</form>
or onclick method
<input type="button" name="b1" value="Register"
onclick="location.href='register.htm'">
Poorna Senani Gamage
- 1,218
- 1
- 18
- 28
0
you can use this too
<button>
<a type="button" href="register.html"> register</a>
</button>
settah abdelkader
- 22
- 3
0
Wrap your register <button> with an <a> tag.
<a href='register.html' target='_self'>
<button>Register</button>
</a>
Use target attribute to specify where to open the link.
_blank= Opens the linked document in a new window or tab_self= (default) Opens the linked document in the same frame as it was clicked_parent= Opens the linked document in the parent frame_top= Opens the linked document in the full body of the window framename
Read more:
Roshana Pitigala
- 7,945
- 8
- 47
- 71