Lab Exercisel Design a web page to and display the text "Welcome to Oman" using java seript. Try the different methods of including javaseript into a web page.
Lab Exercisel Design a web page to and display the text "Welcome to Oman" using java seript. Try the different methods of including javaseript into a web page.
New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter1: Getting Started With Html5: Creating A Website For A Food Vendor
Section: Chapter Questions
Problem 2CP3
Related questions
Question
![Lecture 3
Java Script (Introduction)
Lab Exercisel
Design a web page to and display the text "Welcome to Oman" using java script.
Try the different methods of including javascript into a web page.
Lab Exercise 2
Find the HTML element (with id%3"demo"), and changes the element content (innerHTML) to the
current date and time value:
cre
Lab Exercise 3
Find the HTML element (with id%3D"demo"), and changes the element content (innerHTML) to "Hello
JavaScript":
Lab Exercise 4
Design one HTML page with that will print the sum and product of two integer numbers with the help
of javascript variables.
Lab Exercise 5
Program to demonstrate the use of javascript Alert box.
Lab Exercise 6
Program to demonstrate the use of javascript Confirm box.
Lab Exercise 7
Program to demonstrate the use of javascript Prompt box.
Page 4 of 8](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4bff04ce-fc80-4b25-83d0-a81532498ad6%2F08ef4747-83c4-435b-9fd2-335aa34e5651%2Fg0wxk9_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Lecture 3
Java Script (Introduction)
Lab Exercisel
Design a web page to and display the text "Welcome to Oman" using java script.
Try the different methods of including javascript into a web page.
Lab Exercise 2
Find the HTML element (with id%3"demo"), and changes the element content (innerHTML) to the
current date and time value:
cre
Lab Exercise 3
Find the HTML element (with id%3D"demo"), and changes the element content (innerHTML) to "Hello
JavaScript":
Lab Exercise 4
Design one HTML page with that will print the sum and product of two integer numbers with the help
of javascript variables.
Lab Exercise 5
Program to demonstrate the use of javascript Alert box.
Lab Exercise 6
Program to demonstrate the use of javascript Confirm box.
Lab Exercise 7
Program to demonstrate the use of javascript Prompt box.
Page 4 of 8
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
Program Approach
NOTE: YOU HAVE POSTED A LOT OF QUESTIONS, OUT OF WHICH ONLY FIRST ONE WILL BE SOLVED. IF YOU WISH FOR SOME PARTICULAR QUESTION TO BE SOLVED, PLEASE MENTION IT BY POSTING A NEW QUESTION
For type 1:
- Define the type of document as html
- Define html tag
- Define body tag for main text
- Define heading with type h2
- Define paragraph id as ex
- Define script tag
- Use document.getElementById to print the data
- End script tag
- End body tag
- End html tag
For type 2:
- Define document type as HTML
- Define html tag
- Define body tag
- Define heading
- Define script tag
- use document.write for printing data
- end script tag
- end body tag
- end html tag
Program for Lab 1 :Type 1
<!DOCTYPE html>
<html> <!-- html tag -->
<body> <!-- body tag -->
<h2>My Web Page</h2> <!--heading -->
<p id="ex"></p> <!-- paragraph id -->
<script> <!-- start script -->
document.getElementById("ex").innerHTML = "Welcome to Oman"; <!--call element from p id -->
</script> <!-- end script -->
</body> <!-- end body tag-->
</html> <!--end html tag -->
OUTPUT:
Step by step
Solved in 3 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![New Perspectives on HTML5, CSS3, and JavaScript](https://www.bartleby.com/isbn_cover_images/9781305503922/9781305503922_smallCoverImage.gif)
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
![New Perspectives on HTML5, CSS3, and JavaScript](https://www.bartleby.com/isbn_cover_images/9781305503922/9781305503922_smallCoverImage.gif)
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L