Horje

HTML Button as a Link

To use an HTML button as a link, you have to add some JavaScript code.

JavaScript allows you to specify what happens at certain events, such as a click of a button.

index.html
Example: HTML
<button onclick="document.location='default.asp'">
HTML Tutorial</button>

Output should be:

HTML Button as a Link




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Basic
Uploaded by:
Admin