Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- </head>
- <body>
- <div id="main">
- <button onclick="back()">WSTECZ</button>
- <button onclick="next()">DALEJ</button>
- <button id="button_kolor" onclick="red()">ZMIEN KOLOR</button>
- <p>Witam na mojej stronie</p>
- </div>
- <script>
- function back(){
- window.history.back();
- }
- function next(){
- window.history.forward();
- }
- function red()
- {
- document.bgColor='red'
- }
- var kolorek = "white"
- function zmianakolor()
- {
- if (kolorek == "white"){
- document.bgColor='black'
- document.getElementById("main").style.color = "White"
- kolorek = "black";
- }
- else if (kolorek == "black"){
- document.bgColor='white'
- document.getElementById("main").style.color = "black"
- kolorek = "yellow";
- }
- else if (kolorek == "yellow"){
- document.bgColor='yellow'
- document.getElementById("main").style.color = "black"
- kolorek = "white";
- }
- }
- </script>
- <button onclick="zmianakolor()">ZMIEN KOLOR</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement