$25
CS213 Lab 2 :JavaScript
1. Develop a web-page using javascript for Drivers License Eligibility, withthe following HTML form elements:
• Age (text box)
• Check Eligibility (button)
On clicking the Check Eligibility button, perform the following tasks:
(a) If the age does not lie between the interval 18 to 100, display an alertbox with an error message.
(b) If the above constraint is satisfied, display a success message such asYou are eligible!.
Alternatively, can this validation be performed while making use of attributes of a textbox ?
2. Develop a web-page using javascript to do the following:
palindrome.html : Accept a string through a form and declares if it’s a palindrome.
1
3. Develop a web-page using javascript to do the following:
gcd.html : Compute gcd of two numbers input through a form, and display it.
4. Develop a web-page using javascript to do the following:
Fibonacci.html : Accept an integer n , then generate first n Fibonacci numbers.
2