How to Use iframes Under the Control of Buttons • Write a simple JavaScript program that is composed of two iframes. • The 1st iframe contains a webpage of Air Canada. • Use the webpage below as a reference to create your own 2-iframed webpage: • First, choose your option (either even or odd). • After that, click the “RUN” button to generate and display a random number in the “Simple Guessing Game” textbox. o It will also produce an alert message saying whether the guess is even or odd. o For example: If option button “even number” is chosen and the random number is 18, then an alert message “*** WIN ***” should be displayed. If option button “odd number” is chosen and the random number is 15, then an alert message “*** WIN ***” should be displayed. This program will generate a “*** LOSE ***” message if not winning. • The 2nd iframe is the number guessing game.
Task #2: Practice How to Use iframes Under the Control of Buttons • Write a simple JavaScript
Step by step
Solved in 3 steps