+ 1
How do i connect a button to another file on html
11 Answers
+ 5
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
<button onclick="window.location.href = 'your file path';">Your button name</button>
</body>
</html>
+ 8
Instead of button u can also use <a> tag.
<a href='your file path' >My Button </a>
+ 2
Nest the button in <a> tag
<a href="#"><button>buttonName</button></a>
Hope this helps.
0
Thank you
0
In short:
<a href="file_path.html">
<button>My Button</button>
</a>
0
Vary simple sir. add button tag under the a tag.like thisđ
<a href="your file url"><button>button name</button></a>
- 1
example:
<from action="page2.html">
<button type="submit">Click to go to next page</button>
</from>
- 1
You can use a attribute instead of button and if you want to customize the a attribute to look like a button use this code: https://code.sololearn.com/W2ovvrLkqUf8/?ref=app
- 2
Thank you
- 3
ĂppĂȘĆ ĆßñÄlĂ« a hacker is a person who steals data or pirates thing or at times does something illegal for political,Self use or for the goverment using code ofc