Advertisement
Guest User

számológép

a guest
Mar 22nd, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3.  
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Számológép</title>
  7.  
  8. <script alnguae="javascript">
  9. function szamol () {
  10. a = parseInt(document.matek.a.value)
  11. b = parseInt(document.matek.b.value)
  12. c = a+b
  13. document.matek.c.value = c
  14. console.log(c)
  15. }
  16. </script>
  17.  
  18. </head>
  19.  
  20. <body>
  21. <form name="matek">
  22. <input type="text" name="a"> + <input type="text" name="b"> = <input type="text" name="c"><br>
  23. <input type="button" onclick="szamol ()" value="Szamol"
  24. </form>
  25.  
  26. </body>
  27.  
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement