Question: Create a new HTML file named money _ converter.html . Inside the HTML file, set up the basic structure including the HTML , head, and
Create a new HTML file named moneyconverter.html Inside the HTML file, set up the basic structure including the HTML head, and body tags. Create a script tag within the body of the HTML document to write JavaScript code. Write a JavaScript function that takes two parameters: Currency Type representing the selected currency option and amount representing the amount in SAR to be converted Inside this function, use a switch statement to determine the conversion rate based on the selected Currency Type. Define conversion rates for SAR to US Dollar, SAR to UAE Derham, and SAR to Chinese Yuan. o SAR to US Dollar: SAR USD O SAR to UAE Dirham: SAR AED o SAR to Chinese Yuan: SAR CNY Prompt the user to enter their currency choice using a dialog box. The options should be: o for SAR to US Dollar o for SAR to UAE Derham o for SAR to Chinese Yuan
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
