0

How to make a button?

How to make a button that opens an other page but in the same website? And code in it.

27th Aug 2020, 4:54 PM
Bruce Wayne
Bruce Wayne - avatar
6 Answers
+ 1
you can set the button onclick to show an invisble iframe of the website
27th Aug 2020, 5:00 PM
Jermaine Antwi
Jermaine Antwi - avatar
+ 1
HTML: <button onclick="showWeb()">Show website</button> <iframe style="display: none; width: 100%; height: 100%;" src="website-url"></iframe> JS: const showWeb = () => { document.querySelector("iframe").style = "display: block" document.querySelector("button").style = "display: none" }
27th Aug 2020, 6:35 PM
Qui-Gon Jinn
Qui-Gon Jinn - avatar
0
i completed all of them
27th Aug 2020, 4:58 PM
Bruce Wayne
Bruce Wayne - avatar
0
html css and javascript
27th Aug 2020, 4:58 PM
Bruce Wayne
Bruce Wayne - avatar
0
creating a button is easy my problem is linking it to another page in the same website
27th Aug 2020, 5:00 PM
Bruce Wayne
Bruce Wayne - avatar
0
thanks alot jermaine antwi
27th Aug 2020, 5:02 PM
Bruce Wayne
Bruce Wayne - avatar