1
<a href="signUp.html"><button type="submit" class="btn btn-primary submitSignUp" >Sign Up</button></a>

Why does this not work? I have a different page called signUp and on-click of the sign-up button, I want it to go to the signUp page.

UZAIR VAWDA
  • 13
  • 1
  • 4
  • what error are you seeing? – hackerrdave Apr 08 '17 at 22:32
  • If you want your a tag to look like a button you must use CSS. [a tag like button with CSS](http://stackoverflow.com/questions/710089/how-do-i-make-an-html-link-look-like-a-button) [more ways to do it](http://stackoverflow.com/questions/2906582/how-to-create-an-html-button-that-acts-like-a-link) – Memristor Apr 08 '17 at 22:38
  • Look the following link: [a tag like button](http://stackoverflow.com/questions/2906582/how-to-create-an-html-button-that-acts-like-a-link) – Memristor Apr 08 '17 at 22:39
  • Look the following link: [a tag like button](http://stackoverflow.com/questions/2906582/how-to-create-an-html-button-that-acts-like-a-link) – Memristor Apr 08 '17 at 22:40
  • Give a try to the following link: [a tag like button](http://stackoverflow.com/questions/2906582/how-to-create-an-html-button-that-acts-like-a-link) – Memristor Apr 08 '17 at 22:42
  • Possible duplicate of [Which "href" value should I use for JavaScript links, "#" or "javascript:void(0)"?](http://stackoverflow.com/questions/134845/which-href-value-should-i-use-for-javascript-links-or-javascriptvoid0) – UZAIR VAWDA Apr 08 '17 at 22:47

2 Answers2

5

You should not place <button> inside <a> element as <button> consumes mouse events preventing <a> element click generation.

So try just this

<a href="signUp.html" class="btn btn-primary submitSignUp">Sign Up</a>
c-smile
  • 26,734
  • 7
  • 59
  • 86
0

to have the same result I would suggest you to change your code to this:

<a class="btn btn-primary submitSignUp" href="signUp.html">Sign Up</a>