Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Document</title>
- </head>
- <body>
- <script>
- let kolor=prompt("Podaj kolor: 1-zielony lub 2-czerwony");
- if((kolor==1|kolor=="zielony"))
- {
- document.write("Zdecydowałeś się na kolor<font color=green>zielony</font><br>");
- }
- else
- if((kolor==2|kolor="czerwony"))
- {
- document.write("Zdecydowałeś się na kolor<font color=red>czerwony</font><br>");
- }
- else
- {
- document.write("Podałeś nieprawidłową wartość<br>");
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement