Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <html>
  2. <head>
  3. <script>
  4. function myFunc() {
  5. var First = document.getElemetsByName("First")[0].value;
  6. var Second = document.getElemetsByName("Second")[0].value;
  7. var Third = document.getElemetsByName("Third")[0].value;
  8.  
  9. if (First >= Second && First >= Third)
  10. document.getElementById("demo").innerHTML = First;
  11. else if (Second >= Firsrt && Second >= Third)
  12. document.getElementById("demo").innerHTML = Second;
  13. else
  14. document.getElementById("demo").innerHTML = Third;
  15.  
  16.  
  17. }
  18. </script>
  19. </head>
  20. <body>
  21.  
  22. <input type="text" name ="First" placeholder = "Enter First Number ">
  23. <input type="text" name = "Second" placeholder = "Enter Second Number ">
  24. <input type="text" name = "Third" placeholder = "Enter Third Number ">
  25. <input type="button" Value="Calc" onclick="myFunc()" >
  26. <p id="demo"></p>
  27. </body>
  28.  
  29. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement