2. Write a JavaScript program to add a behavior to a web page so that it will change the
existing default image based on a value entered by the user among three different
choices (coffee, tea, water). You have to add one image (default must be question
mark image). If user entered any value out of the choices, you must alert a message.
Below are examples of the expected output:
Blackboard Learn College of Applied..
Apps Mobile Application..
Click on the image to change it!
?
Click on the image to change it!
This page says
Please enter one of the following: Water, Coffee or lea
?
OK
Cancel
!!!Apps
Mobile Application...
Blackboard Learn College of Applied...
This page says
Click on the image to change it!
?
Apps Mobile Application..
Blackboard Learn College of Applied...
Click on the image to change it!
?
Please enter one of the following: Water, Coffee or Tea
juice
?
OK
Cancel
This page says
Your choice not available!!
OK