How can i figure this out

Discussion in 'JavaScript' started by mimang, Feb 21, 2011.

  1. #1
    contact: sprincycs@gmail.com

    <script type="text/javascript">
    /* <![CDATA[ */

    function wLoop(count) {
    count = parseInt(count);
    if(count == 10){
    document.alert("number is too large");
    }
    }

    /* ]]> */
    </script>

    </head>
    <body>
    <form name="loops">
    <p>Enter a number between 1 - 9999</p>
    <input name="wLoopText" type="text"/><br/>
    <input type="button" value="While Loop" onclick="wLoop(document.loops.wLoopText.value)" name="wLoopButton"/><br/>
    <br/>
    <p>Enter a number between 1 - 9999</p>
    <input name="fLoopText" type="text"/><br/>
    <input type="button" value="For Loop" onclick="fLoop()" name="fLoopButton"/><br/>
    </form>

    /* ]]> */
    </script>
     
    mimang, Feb 21, 2011 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Cash Nebula, Feb 22, 2011 IP