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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Task #2: Practice 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. Hints:  <iframe src="http://c101.000webhostapp.com/demo_1.html" height="120" width="130"></iframe>  var num1 = Math.round(Math.random() * 21);  textBox1.value = num1;

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Study of Characters
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education