+ 1

How do i connect a button to another file on html

23rd Oct 2020, 2:18 PM
Unik Hajdari
Unik Hajdari - avatar
11 odpowiedzi
+ 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>
23rd Oct 2020, 2:25 PM
Matias
Matias - avatar
+ 8
Instead of button u can also use <a> tag. <a href='your file path' >My Button </a>
23rd Oct 2020, 3:27 PM
Aakaanksha 💕 [TheBraveCoders]
Aakaanksha 💕 [TheBraveCoders] - avatar
+ 2
Nest the button in <a> tag <a href="#"><button>buttonName</button></a> Hope this helps.
25th Oct 2020, 8:56 AM
Shreyansh
0
Thank you
23rd Oct 2020, 2:26 PM
Unik Hajdari
Unik Hajdari - avatar
0
In short: <a href="file_path.html"> <button>My Button</button> </a>
25th Oct 2020, 1:10 AM
Tipu Sultan
Tipu Sultan - avatar
0
Vary simple sir. add button tag under the a tag.like this👇 <a href="your file url"><button>button name</button></a>
25th Oct 2020, 7:48 AM
Hriday Kalita
- 1
example: <from action="page2.html"> <button type="submit">Click to go to next page</button> </from>
24th Oct 2020, 9:34 AM
Cleen
Cleen - avatar
- 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
25th Oct 2020, 7:37 AM
Zehan Siddiqui
Zehan Siddiqui - avatar
- 2
Thank you
23rd Oct 2020, 4:45 PM
Unik Hajdari
Unik Hajdari - avatar
- 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
24th Oct 2020, 7:18 PM
Unik Hajdari
Unik Hajdari - avatar