Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 % CStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started