Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <script>
- function zmien_kwadrat()
- {
- var k=document.getElementById("kwadrat");
- if (k.style.backgroundColor=="red")
- {
- with (k.style)
- {
- backgroundColor="yellow";
- width="200px";
- height="200px";
- }
- }
- else
- {
- with (k.style)
- {
- backgroundColor="red";
- width="400px";
- height="400px";
- }
- }
- }
- </script>
- </head>
- <body>
- <div id="kwadrat"
- style="background-color:red; width:400px; height:400px;" onclick="zmien_kwadrat();"
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement