+ 4
How do i make a button that takes me to a new page when clicked
4 odpowiedzi
+ 6
<a href="https://www.google.com">
<button>Google Search</button>
</a>
Replace the href attribute to your desired URL and set button text also as necessary.
+ 4
<input type="button" onclick="location.href = 'https://www.wikipedia.org'" value="Click me" />
I'm using Wikipedia because it allows frames + will work on SoloLearn -- most major sites, like Google, MSN, Yahoo (etc) will detect the CodePlayground environment and deny navigation. This is only particular to this type of navigation here -- it should work fine at home / in a personally-managed web page.
+ 3
I think you can use the action attribute of the form tag.
0
here are a few methods; <form action=“#”><input type=“submit” value=“submit”/></form> or <a href=“#” type=“button”>//Enter here</a>