<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.
<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.
Share Improve this question asked Apr 8, 2017 at 22:31 UZAIR VAWDAUZAIR VAWDA 131 silver badge4 bronze badges 6- what error are you seeing? – hackerrdave Commented Apr 8, 2017 at 22:32
- If you want your a tag to look like a button you must use CSS. a tag like button with CSS more ways to do it – Memristor Commented Apr 8, 2017 at 22:38
- Look the following link: a tag like button – Memristor Commented Apr 8, 2017 at 22:39
- Look the following link: a tag like button – Memristor Commented Apr 8, 2017 at 22:40
- Give a try to the following link: a tag like button – Memristor Commented Apr 8, 2017 at 22:42
2 Answers
Reset to default 6You 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>
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>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745105833a4611550.html
评论列表(0条)