Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html lang="pl">
- <html>
- <head>
- <meta charset="utf-8">
- <script>
- var s,a;
- s=0;
- function licz()
- {
- a=parseFloat(document.getElementById("pole").value);
- s=s+a;
- document.getElementById("wyniko").value=s;
- }
- function czysc()
- {
- document.getElementById("wyniko").value="";
- document.getElementById("pole").value="";
- s=0;
- }
- function a9()
- {
- document.getElementById("wyniko").value="9";
- }
- function a8()
- {
- document.getElementById("wyniko").value="8";
- }
- function a7()
- {
- document.getElementById("wyniko").value="7";
- }
- function a6()
- {
- document.getElementById("wyniko").value="6";
- }
- function a5()
- {
- document.getElementById("wyniko").value="5";
- }
- function a4()
- {
- document.getElementById("wyniko").value="4";
- }
- function a3()
- {
- document.getElementById("wyniko").value="3";
- }
- function a2()
- {
- document.getElementById("wyniko").value="2";
- }
- function a1()
- {
- document.getElementById("wyniko").value="1";
- }
- function a0()
- {
- document.getElementById("wyniko").value="";
- }
- </script>
- </head>
- <body>
- <center>
- <button onClick="licz()">Widok</button>
- <button onClick="licz()">Edycja</button>
- <button onClick="licz()">Pomoc</button>
- <br>
- <input type="text" id="wyniko"/>
- <br>
- <button onClick="a9()">9</button>
- <button onClick="a8()">8</button>
- <button onClick="a7()">7</button>
- <br>
- <button onClick="a6()">6</button>
- <button onClick="a5()">5</button>
- <button onClick="a4()">4</button>
- <br>
- <button onClick="a3()">3</button>
- <button onClick="a2()">2</button>
- <button onClick="a1()">1</button>
- <br>
- <button onClick="a0()">0</button>
- <button onClick="licz()">=</button>
- <button onClick="czysc()">C</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement