jeudi 28 mars 2019

input the number and find the largest and lowest number using jquery

<script type="text/javascript">
  function largest() {
    var num1, num2;
    num1 = Number(document.getElementById("N").value);
    num2 = Number(document.getElementById("M").value);
    if (num1 > num2) {
      window.alert(num1 + "-is largest");
    } else if (num2 > num1) {
      window.alert(num2 + "-is largest");
    }
</script>

Aucun commentaire:

Enregistrer un commentaire