Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <title>hypotinous calculator</title>
- <h1>hypotinous calculator</h1>
- <script type="text/javascript">
- function setValue(){
- a= document.forms["myform"]["text1"].value
- }
- function setValued(){
- b= document.forms["myform1"]["text11"].value
- }
- function ya(){
- var c= Math.sqrt(Math.pow(a,2)+Math.pow(b,2))
- alert(c)
- }
- </script>
- <form name="myform">
- <input type="text" name="text1" value="">
- <input type="button" value="set" onclick="setValue()">
- </form>
- <button onclick="ya();">see awnser</button>
- <form name="myform1">
- <input type="text" name="text11" value="">
- <input type="button" value="set"
- onclick="setValued()">
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement