stahl7639
10-17-2008, 03:27 AM
Hello,
My name is Adam, and I am in a computer class that is utilizing JavaScript for our webpages.I know HTML, CSS, and a bit of Java, but JavaScript has always been a thorn in my side.
Forthe class, I need to write code that allows a user to input to number into an HTML form, and the program must return the higher number. So far, I have only been ableto write the form code,but I am really stuck on the JavaScript code.
<form>
<p>First Number:</p>
<input type="text" size="13" maxlength="12" name="firstnumber">
<br>
<p>Second Number</p>
<input type="text"size="13" maxlength="12" name="secondnumber">
<br>
<p>The Higher Number:</p>
<input type="text" size="13" maxlength="12"name="highernumber">
</form>
Also, I haveto convert the numbers from a string to an integer. I am kind of confused about this as well.
Any help would be GREATLY appreciated.
Thank you,
Adam
My name is Adam, and I am in a computer class that is utilizing JavaScript for our webpages.I know HTML, CSS, and a bit of Java, but JavaScript has always been a thorn in my side.
Forthe class, I need to write code that allows a user to input to number into an HTML form, and the program must return the higher number. So far, I have only been ableto write the form code,but I am really stuck on the JavaScript code.
<form>
<p>First Number:</p>
<input type="text" size="13" maxlength="12" name="firstnumber">
<br>
<p>Second Number</p>
<input type="text"size="13" maxlength="12" name="secondnumber">
<br>
<p>The Higher Number:</p>
<input type="text" size="13" maxlength="12"name="highernumber">
</form>
Also, I haveto convert the numbers from a string to an integer. I am kind of confused about this as well.
Any help would be GREATLY appreciated.
Thank you,
Adam