Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

Consider code given below:
Enter a Value
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions