Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="pl">
- <head>
- <meta charset="UTF-8">
- <title>praca</title>
- </head>
- <body>
- <form>
- <input type="text" id="ilgos">ilość gości</input>
- <br>
- <input type="checkbox" id="popr"></input>
- <button onclick="Function()">Przycisk</button>
- </form>
- <script>
- var checkbox = document.getElementById("popr");
- function Function(){
- if (checkbox.check == true){
- console.log(document.getElementById("ilgos").value);
- };
- };
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement