Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. <title>hypotinous calculator</title>
  5. <h1>hypotinous calculator</h1>
  6. <script type="text/javascript">
  7.  
  8. function setValue(){
  9.  
  10. a= document.forms["myform"]["text1"].value
  11.  
  12. }
  13.  
  14. function setValued(){
  15.  
  16. b= document.forms["myform1"]["text11"].value
  17.  
  18. }
  19.  
  20.  
  21. function ya(){
  22.  
  23. var c= Math.sqrt(Math.pow(a,2)+Math.pow(b,2))
  24.  
  25. alert(c)
  26.  
  27.  
  28. }
  29.  
  30.  
  31.  
  32. </script>
  33.  
  34. <form name="myform">
  35. <input type="text" name="text1" value="">
  36. <input type="button" value="set" onclick="setValue()">
  37. </form>
  38.  
  39. <button onclick="ya();">see awnser</button>
  40.  
  41. <form name="myform1">
  42. <input type="text" name="text11" value="">
  43. <input type="button" value="set"
  44. onclick="setValued()">
  45.  
  46. </form>
  47. </body>
  48. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement