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>
- <script>
- function oblicz() {
- var x = parseFloat(document.getElementById("x").value);
- var y = parseFloat(document.getElementById("y").value);
- var pole = x * y;
- document.getElementById("pole").innerHTML = pole.toFixed(2);
- }
- </script>
- </head>
- <body>
- <img src="obrazek.png" alt="">
- <form>
- <input type="text" id="x"><br>
- <input type="text" id="y"><br>
- <input type="button" value="Oblicz" onclick="oblicz()">
- </form>
- <p id="pole"></p>
- </body>
- </html>
Add Comment
Please, Sign In to add comment