Following is the HTML code for the above web page.
Enter the details
Write the JavaScript code to be embedded in the above HTML code for the click event of the button which will display the alert message “Eligible for Voting” if the following validations are true:
i. The age should be numeric and should be more than 18 [5]
ii. The nationality should be “Zimbabwean” [5]
iii. The alert message “Not eligible to vote” should be displayed if any of the above mentioned validations are false. [5]
Following is the HTML code for the above web page.
Enter the details
Write the JavaScript code to be embedded in the above HTML code for the click event of the button which will display the alert message “Eligible for Voting” if the following validations are true: i. The age should be numeric and should be more than 18 [5] ii. The nationality should be “Zimbabwean” [5] iii. The alert message “Not eligible to vote” should be displayed if any of the above mentioned validations are false. [5]
@Surveyor-Jr