Reputation:
I have a button on my screen using the code
<input type="submit" value="Log In" class="LogInButton">
and I want when I click the button to take me to another page.
I have tried <input href="home.html" type="submit" value="Log In" class="LogInButton">
but that didn't seem to work.
Upvotes: 0
Views: 192
Reputation: 20452
Have you considered replacing you <button>
by an <anchor>
?
<a href="home.html" class="LogInButton">Log In</a>
Upvotes: 1
Reputation: 549
Simple use button:
<button onclick="location.href='http://yoursite.com'">Click ME</button>
Upvotes: 0
Reputation: 53674
You can use an onclick
event and use location.href
to change the URL
<input type="submit" value="Log In" class="LogInButton" onclick="location.href='home.html'">
Upvotes: 0
Reputation: 28187
Just add an action
property to your form
tag.
i.e. <form action="home.html" ...>
Upvotes: 2