HTML link button
From w3cyberlearnings
Contents |
HTML - Link Button
When user clicks on a link or a button, it triggers a new window to open.
Example 1 TRY-IT
<a href="http://www.google.com">Google</a><br/> <a href="http://www.w3cyberlearnings.com">w3cyberlearnings.com</a><br/>
Example 2 TRY-IT
<html> <head> <title>Link Button</title> </head> <body> <form> <input type="button" value="Link 1" onclick="window.location.href='http://w3cyberlearnings.com'"/> </form> </body> </html>
Example 3 TRY-IT
<html> <head> <title>Link Button</title> </head> <body> <form> <input type="button" value="Link 1" onclick="parent.location='http://w3cyberlearnings.com'"/> </form> </body> </html>
Example 4 TRY-IT
<html> <head> <title>Link Button</title> </head> <body> <form action="http://w3cyberlearnings.com"> <button type="submit">Click Me</button> </form> </body> </html>
Related Link
- HTML - Links
- HTML - Link button