+ 1
Min Yoongi
Instead of creating every page with javascript using document.write, try using js/css to control div visibility. It's much simpler.
--edit--
added horizontal swipe page change for touchscreen devices.
https://code.sololearn.com/W49s4LW246xd/?ref=app
+ 8
You can use onclick attribute and write the link whatever you want to open on clicking the button
+ 6
Look at this way:
<button onclick=location.href=âhttps://sololearn.comâ>Click me!</button>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We use onclick event to open other web page using a button.
+ 4
Look at self.document.write
There you can write the html code of the second window
Use <style> tag for css
+ 3
Min Yoongi
Use class or id to add css
HTML:
<button class=âbutâ>Click me!</button>
CSS:
.but {
width: 60%;
height: 20%;
color: white;
border: 2px solid white;
background-color: black;
}
+ 2
Spartan Junior dont answer a question to ask other question
And complete sololearn's html course to do what you want.
+ 2
Okay sir
+ 1
button Đ”ŃĐŸ ĐșĐœĐŸĐżĐșа
+ 1
Can someone teach me how to create a website using html
+ 1
You can also use Form tag
<form action=" link of the page" >
<button >Click Me </button >
</form>