Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html lang="pl">
- <head>
- <script type="text/javascript">
- function eurazjer(){
- var a = document.getElementById("polea").value;
- a = parseInt(a);
- var b = document.getElementById("poleb").value;
- b = parseInt(b);
- var wynik=(a*a)+(2*a*b)+(b*b)
- document.getElementById("pies").innerHTML=("Wynik to: "+wynik+".");
- }
- </script>
- <meta charset="UTF-8"/>
- </head>
- <body>
- Podaj A:</br>
- <input type="text" id="polea" name="" /></br>
- Podaj B:</br>
- <input type="text" id="poleb" name=""/></br>
- <input type="text" id="wzór" value="a^2+(2*a*b)+b^2" disabled/>
- <input type="submit" value="Oblicz" onclick="eurazjer()"/></br>
- <div id="pies"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement