You can verify whether the value entered in the textbox is present in an array.
Copy the code from the given textarea and use it.
Enter value into Textbox to check whether it is present in array.
The array has value from 1 to 10.
Here, the function "cal(form.val.value)" is called by passing the entered value in the textbox as argument. Then the function checks whether the argument passed is present in the array or not and returns message accordingly.