SlideShare a Scribd company logo
Java Script
Displaying message
Content on Web Page
• Static content
• Dynamic content- Data Driven
– Data
• Processed Data
• User Generated
Methods
• Internal
– JavaScript (JS) code written within HTML file
• External
– JavaScript(JS) code written in separate JS file
– External JS file linked to HTML file
Internal-Code embedded within HTML
• In HTML File –innerHtml
<p id="para"> </p>
<script>
document.getElementById("para").innerHTML = "Hello
World";
</script>
Code to link External JS file
• In HTML File
<script language="javascript" src="myscript.js">
</script>
External- Code written in JS file
• In separate JS File
document.write();
function f1()
{
document.write("Hello World");
}
External- Code written in JS file
• In JS File
window.alert();
function f2()
{
window.alert("Hello World");
}
JS within HTML
document.write();
• Existing content on page is
removed.
• New Page with only the
message on document.write
command is printed.
window.alert();
• Existing content on page is
not removed.
• An alert window appears on
the existing window with
the message on
window.alert command
printed on it.
External- Code written in JS file
• In JS File
console.log(); - writes to the console not the
web page window.
function f2()
{
console.log("Hello World!);
}
Displaying message in JS on web
page
https://www.codewizacademy.com
https://www.facebook.com/codewizacademy/
https://www.instagram.com/codewizacademy/

More Related Content

What's hot

HTML5 Web storage
HTML5 Web storageHTML5 Web storage
HTML5 Web storage
Muhammad Ehtisham Siddiqui
 
HTML elements
HTML elementsHTML elements
HTML elements
Low-Code Starter Pack
 
HTML5 Storage/Cache
HTML5 Storage/CacheHTML5 Storage/Cache
HTML5 Storage/Cache
Andy Wang
 
Notes on SF W3Conf
Notes on SF W3ConfNotes on SF W3Conf
Notes on SF W3Conf
Edy Dawson
 
Javascript inside Browser (DOM)
Javascript inside Browser (DOM)Javascript inside Browser (DOM)
Javascript inside Browser (DOM)
Vlad Mysla
 
Web forms and html lecture Number 5
Web forms and html lecture Number 5Web forms and html lecture Number 5
Web forms and html lecture Number 5
Mudasir Syed
 
XDate - a modern java-script date library
XDate -  a modern java-script date libraryXDate -  a modern java-script date library
XDate - a modern java-script date library
Guo Albert
 
JavaScript Frameworks for SharePoint add-ins Cambridge
JavaScript Frameworks for SharePoint add-ins CambridgeJavaScript Frameworks for SharePoint add-ins Cambridge
JavaScript Frameworks for SharePoint add-ins Cambridge
Sonja Madsen
 
SharePoint Saturday Vietnam 8th - managed metadata.pptx
SharePoint Saturday Vietnam 8th - managed metadata.pptxSharePoint Saturday Vietnam 8th - managed metadata.pptx
SharePoint Saturday Vietnam 8th - managed metadata.pptx
Terrence Nguyen
 
Wai yanleunglinktag
Wai yanleunglinktagWai yanleunglinktag
Wai yanleunglinktag
waiyanleung
 
Hdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed SolutionsHdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed Solutions
woutervugt
 
DOJO
DOJO DOJO
DOJO
Mahi Mca
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Hossein Boustani
 
Javascript DOM
Javascript DOMJavascript DOM
Javascript DOM
Yoeung Vibol
 
Lt local storage
Lt local storageLt local storage
Lt local storage
Yuzu Saijo
 
In browser data stores
In browser data storesIn browser data stores
In browser data stores
James Thomas
 
Interacting with the DOM (JavaScript)
Interacting with the DOM (JavaScript)Interacting with the DOM (JavaScript)
Interacting with the DOM (JavaScript)
Florence Davis
 
новый текстовый документ
новый текстовый документновый текстовый документ
новый текстовый документ
Anatoly Degtar
 
Internet and Web Technology (CLASS-6) [BOM]
Internet and Web Technology (CLASS-6) [BOM] Internet and Web Technology (CLASS-6) [BOM]
Internet and Web Technology (CLASS-6) [BOM]
Ayes Chinmay
 
Html5-Web-Storage
Html5-Web-StorageHtml5-Web-Storage
Html5-Web-Storage
Mindfire Solutions
 

What's hot (20)

HTML5 Web storage
HTML5 Web storageHTML5 Web storage
HTML5 Web storage
 
HTML elements
HTML elementsHTML elements
HTML elements
 
HTML5 Storage/Cache
HTML5 Storage/CacheHTML5 Storage/Cache
HTML5 Storage/Cache
 
Notes on SF W3Conf
Notes on SF W3ConfNotes on SF W3Conf
Notes on SF W3Conf
 
Javascript inside Browser (DOM)
Javascript inside Browser (DOM)Javascript inside Browser (DOM)
Javascript inside Browser (DOM)
 
Web forms and html lecture Number 5
Web forms and html lecture Number 5Web forms and html lecture Number 5
Web forms and html lecture Number 5
 
XDate - a modern java-script date library
XDate -  a modern java-script date libraryXDate -  a modern java-script date library
XDate - a modern java-script date library
 
JavaScript Frameworks for SharePoint add-ins Cambridge
JavaScript Frameworks for SharePoint add-ins CambridgeJavaScript Frameworks for SharePoint add-ins Cambridge
JavaScript Frameworks for SharePoint add-ins Cambridge
 
SharePoint Saturday Vietnam 8th - managed metadata.pptx
SharePoint Saturday Vietnam 8th - managed metadata.pptxSharePoint Saturday Vietnam 8th - managed metadata.pptx
SharePoint Saturday Vietnam 8th - managed metadata.pptx
 
Wai yanleunglinktag
Wai yanleunglinktagWai yanleunglinktag
Wai yanleunglinktag
 
Hdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed SolutionsHdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed Solutions
 
DOJO
DOJO DOJO
DOJO
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Javascript DOM
Javascript DOMJavascript DOM
Javascript DOM
 
Lt local storage
Lt local storageLt local storage
Lt local storage
 
In browser data stores
In browser data storesIn browser data stores
In browser data stores
 
Interacting with the DOM (JavaScript)
Interacting with the DOM (JavaScript)Interacting with the DOM (JavaScript)
Interacting with the DOM (JavaScript)
 
новый текстовый документ
новый текстовый документновый текстовый документ
новый текстовый документ
 
Internet and Web Technology (CLASS-6) [BOM]
Internet and Web Technology (CLASS-6) [BOM] Internet and Web Technology (CLASS-6) [BOM]
Internet and Web Technology (CLASS-6) [BOM]
 
Html5-Web-Storage
Html5-Web-StorageHtml5-Web-Storage
Html5-Web-Storage
 

Similar to Displaying message on web page in Javascript

Client-side JavaScript
Client-side JavaScriptClient-side JavaScript
Client-side JavaScript
Lilia Sfaxi
 
Go Fullstack: JSF for Public Sites (CONFESS 2013)
Go Fullstack: JSF for Public Sites (CONFESS 2013)Go Fullstack: JSF for Public Sites (CONFESS 2013)
Go Fullstack: JSF for Public Sites (CONFESS 2013)
Michael Kurz
 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScript
koppenolski
 
Creating Custom Templates for Joomla! 2.5
Creating Custom Templates for Joomla! 2.5Creating Custom Templates for Joomla! 2.5
Creating Custom Templates for Joomla! 2.5
Don Cranford
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
Seble Nigussie
 
Web Components: The future of Web Application Development
Web Components: The future of Web Application DevelopmentWeb Components: The future of Web Application Development
Web Components: The future of Web Application Development
Jermaine Oppong
 
Xml part 6
Xml part 6Xml part 6
Xml part 6
NOHA AW
 
web dev
web devweb dev
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipei
littlebtc
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
Hernan Mammana
 
WebsiteStructure
WebsiteStructureWebsiteStructure
WebsiteStructure
tutorialsruby
 
WebsiteStructure
WebsiteStructureWebsiteStructure
WebsiteStructure
tutorialsruby
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
Shumpei Shiraishi
 
2016 stop writing javascript frameworks by Joe Gregorio
2016 stop writing javascript frameworks by Joe Gregorio2016 stop writing javascript frameworks by Joe Gregorio
2016 stop writing javascript frameworks by Joe Gregorio
David Zapateria Besteiro
 
Ui dev@naukri-2011
Ui dev@naukri-2011Ui dev@naukri-2011
Ui dev@naukri-2011
Pankaj Maheshwari
 
Java script Learn Easy
Java script Learn Easy Java script Learn Easy
Java script Learn Easy
prince Loffar
 
IndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web AppsIndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web Apps
Adégòkè Obasá
 
MozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: TaichungMozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: Taichung
littlebtc
 
Web Components - The Future is Here
Web Components - The Future is HereWeb Components - The Future is Here
Web Components - The Future is Here
Gil Fink
 
前端概述
前端概述前端概述
前端概述
Ethan Zhang
 

Similar to Displaying message on web page in Javascript (20)

Client-side JavaScript
Client-side JavaScriptClient-side JavaScript
Client-side JavaScript
 
Go Fullstack: JSF for Public Sites (CONFESS 2013)
Go Fullstack: JSF for Public Sites (CONFESS 2013)Go Fullstack: JSF for Public Sites (CONFESS 2013)
Go Fullstack: JSF for Public Sites (CONFESS 2013)
 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScript
 
Creating Custom Templates for Joomla! 2.5
Creating Custom Templates for Joomla! 2.5Creating Custom Templates for Joomla! 2.5
Creating Custom Templates for Joomla! 2.5
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Web Components: The future of Web Application Development
Web Components: The future of Web Application DevelopmentWeb Components: The future of Web Application Development
Web Components: The future of Web Application Development
 
Xml part 6
Xml part 6Xml part 6
Xml part 6
 
web dev
web devweb dev
web dev
 
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipei
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
 
WebsiteStructure
WebsiteStructureWebsiteStructure
WebsiteStructure
 
WebsiteStructure
WebsiteStructureWebsiteStructure
WebsiteStructure
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
2016 stop writing javascript frameworks by Joe Gregorio
2016 stop writing javascript frameworks by Joe Gregorio2016 stop writing javascript frameworks by Joe Gregorio
2016 stop writing javascript frameworks by Joe Gregorio
 
Ui dev@naukri-2011
Ui dev@naukri-2011Ui dev@naukri-2011
Ui dev@naukri-2011
 
Java script Learn Easy
Java script Learn Easy Java script Learn Easy
Java script Learn Easy
 
IndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web AppsIndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web Apps
 
MozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: TaichungMozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: Taichung
 
Web Components - The Future is Here
Web Components - The Future is HereWeb Components - The Future is Here
Web Components - The Future is Here
 
前端概述
前端概述前端概述
前端概述
 

More from Codewizacademy

Implementing OODA Loop in online teaching
Implementing OODA Loop in online teachingImplementing OODA Loop in online teaching
Implementing OODA Loop in online teaching
Codewizacademy
 
Tie up loose ends
Tie up loose endsTie up loose ends
Tie up loose ends
Codewizacademy
 
Reflect
ReflectReflect
Review
ReviewReview
Revise
ReviseRevise
Organizing content of course
Organizing content of courseOrganizing content of course
Organizing content of course
Codewizacademy
 
Rules and policies for course
Rules and policies for courseRules and policies for course
Rules and policies for course
Codewizacademy
 
Content Creation
Content CreationContent Creation
Content Creation
Codewizacademy
 
Taxonomies
TaxonomiesTaxonomies
Taxonomies
Codewizacademy
 
Course outline
Course outlineCourse outline
Course outline
Codewizacademy
 
Course development
Course developmentCourse development
Course development
Codewizacademy
 
Looping
LoopingLooping
Conditional Constructs in Javascript
Conditional Constructs in JavascriptConditional Constructs in Javascript
Conditional Constructs in Javascript
Codewizacademy
 
Storage in programming
Storage in programmingStorage in programming
Storage in programming
Codewizacademy
 
Programming fundamentals through javascript
Programming fundamentals through javascriptProgramming fundamentals through javascript
Programming fundamentals through javascript
Codewizacademy
 
Cyber Security
Cyber SecurityCyber Security
Cyber Security
Codewizacademy
 
Website Security
Website SecurityWebsite Security
Website Security
Codewizacademy
 
Website Cookies
Website CookiesWebsite Cookies
Website Cookies
Codewizacademy
 
GDPR- General Data Protection Regulation
GDPR- General Data Protection RegulationGDPR- General Data Protection Regulation
GDPR- General Data Protection Regulation
Codewizacademy
 
CSS- Cascading Style Sheet
CSS- Cascading Style SheetCSS- Cascading Style Sheet
CSS- Cascading Style Sheet
Codewizacademy
 

More from Codewizacademy (20)

Implementing OODA Loop in online teaching
Implementing OODA Loop in online teachingImplementing OODA Loop in online teaching
Implementing OODA Loop in online teaching
 
Tie up loose ends
Tie up loose endsTie up loose ends
Tie up loose ends
 
Reflect
ReflectReflect
Reflect
 
Review
ReviewReview
Review
 
Revise
ReviseRevise
Revise
 
Organizing content of course
Organizing content of courseOrganizing content of course
Organizing content of course
 
Rules and policies for course
Rules and policies for courseRules and policies for course
Rules and policies for course
 
Content Creation
Content CreationContent Creation
Content Creation
 
Taxonomies
TaxonomiesTaxonomies
Taxonomies
 
Course outline
Course outlineCourse outline
Course outline
 
Course development
Course developmentCourse development
Course development
 
Looping
LoopingLooping
Looping
 
Conditional Constructs in Javascript
Conditional Constructs in JavascriptConditional Constructs in Javascript
Conditional Constructs in Javascript
 
Storage in programming
Storage in programmingStorage in programming
Storage in programming
 
Programming fundamentals through javascript
Programming fundamentals through javascriptProgramming fundamentals through javascript
Programming fundamentals through javascript
 
Cyber Security
Cyber SecurityCyber Security
Cyber Security
 
Website Security
Website SecurityWebsite Security
Website Security
 
Website Cookies
Website CookiesWebsite Cookies
Website Cookies
 
GDPR- General Data Protection Regulation
GDPR- General Data Protection RegulationGDPR- General Data Protection Regulation
GDPR- General Data Protection Regulation
 
CSS- Cascading Style Sheet
CSS- Cascading Style SheetCSS- Cascading Style Sheet
CSS- Cascading Style Sheet
 

Recently uploaded

writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
sayalidalavi006
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 

Recently uploaded (20)

writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 

Displaying message on web page in Javascript

  • 2. Content on Web Page • Static content • Dynamic content- Data Driven – Data • Processed Data • User Generated
  • 3. Methods • Internal – JavaScript (JS) code written within HTML file • External – JavaScript(JS) code written in separate JS file – External JS file linked to HTML file
  • 4. Internal-Code embedded within HTML • In HTML File –innerHtml <p id="para"> </p> <script> document.getElementById("para").innerHTML = "Hello World"; </script>
  • 5. Code to link External JS file • In HTML File <script language="javascript" src="myscript.js"> </script>
  • 6. External- Code written in JS file • In separate JS File document.write(); function f1() { document.write("Hello World"); }
  • 7. External- Code written in JS file • In JS File window.alert(); function f2() { window.alert("Hello World"); }
  • 8. JS within HTML document.write(); • Existing content on page is removed. • New Page with only the message on document.write command is printed. window.alert(); • Existing content on page is not removed. • An alert window appears on the existing window with the message on window.alert command printed on it.
  • 9. External- Code written in JS file • In JS File console.log(); - writes to the console not the web page window. function f2() { console.log("Hello World!); }
  • 10. Displaying message in JS on web page https://www.codewizacademy.com https://www.facebook.com/codewizacademy/ https://www.instagram.com/codewizacademy/