Collecting Input in JavaScript.
Let's add some input mechanism so our user enters the set of
numbers whose H.C.F. (G.C.D.) we are to find.
Let's add some input mechanism so our user enters the set of
numbers whose H.C.F. (G.C.D.) we are to find.
The code follows the same steps as that from the previous lessons.
We just adapted the HCF.html
The user gets to enter his/her choice of numbers.
After entering each number, the user clicks the
Next Number! button to enter his/her number.
After the user enters his/her last number, with the last
number still in the text box, the user clicks the
Find H.C.F. button.
Create 1 new file; On Notepad++: File, New.
Call them HCFInput.html
Type out the adjoining JavaScript code for collecting input for H.C.F. (G.C.D.).