Question: I need a typed answer. Consider code given below: Enter a Value Assume that the page accepts a file name as the value. The page
I need a typed answer.

Consider code given below:
Assume that the page accepts a file name as the value. The page should accepts only JPG (file extension is jpeg) and GIF (file extension is gif). Write a JavaScript function called validateFile() to check the file extension. If the user has entered a correct value display an alert saying, "File is accepted". If the value is incorrect, an error message should be displayed. Input : happy.jpg Output: File is accepted 1 A- B I EE EE % C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
