SlideShare a Scribd company logo
Ayes Chinmay
Internet
&
Web Technology
(BOM)
IWT Syllabus:
Module 2:
Java Script
Scripting: Java script: Introduction, statements, comments, variables, operators, documents,
forms, functions, objects, events, Strings, Numbers, Arrays, Date, Math, Random, Loops,
Regxp, errors, this, Let, Const., classes, debugging .
The HTML DOM (Document Object Model)
Introduction, DOM Methods, DOM Document, DOM Elements , DOM HTML, DOM CSS,
DOM Events, DOM Navigation, DOM Nodes , DOM Nodelist
The Browser Object Model (BOM)
The Window Object, Window Size, Window History, Window Navigator, Browser Detection,
JavaScript Timing Events, Cookies, Working on Cookies using Java script.
BROWSER OBJECT MODEL:
 The Browser Object Model (BOM) is used to interact with the browser.
 The default object of browser is window means you can call all the
functions of window by specifying window or directly.
 window.alert("hello javatpoint"); is same as alert("hello javatpoint"); .
BROWSER OBJECT MODEL:
BOM Hierarchy:
BOM:
1. The top level object in the BOM is the window object. The window object
represents the browser window. All other browser objects are contained within the
window object. The window object includes a number of properties and methods
that can be used to control the Web browser. The window object along with its
properties and methods are discussed in more detail in a later section.
2. The document object represents the Web page displayed in the browser. All
elements on a Web page including HTML tags are contained within the document
object. Since the document object is often considered the most important part of
the BOM, it is represented by its own object model called the Document Object
Model or DOM. The DOM will be discussed in more detailed in later tutorials.
3. Other objects of the browser object model include the navigator object, the screen
object, that contains information about the visitor's screen, the history object, that
is part of the window object and contains the URLs that have been visited by the
user, and the location object that contains information about the current URL.
Within the window object are document objects representing elements within the
Web pages.
BOM Objects:
Reference Object
window The main browser window
window.navigator Information about the browser itself
window.screen The user's screen
window.history URLs visited by a user
window.location The current URL
window.document (document)
The document appearing in the main browser
window
document.getElementById("id")
An HTML element appearing in a document
and identified by its assigned id value.
Window Object:
The window object represents a window in browser. An object of window
is created automatically by the browser.
Window is the object of browser, it is not the object of javascript. The
javascript objects are string, array, date etc.
<script type="text/javascript">
function msg(){
alert("Hello Alert Box");
}
</script>
<input type="button" value="click" onclick="msg()"/>
<script type="text/javascript">
function msg(){
var v= prompt("Who are you?");
alert("I am "+v);
}
</script>
<input type="button" value="click" onclick="msg()"
/>
Window Object:
<script type="text/javascript">
function msg(){
var v= prompt("Who are you?");
alert("I am "+v);
}
</script>
<input type="button“
value="click" onclick="msg()"/>
1.<script type="text/javascript">
2.function msg(){
3.var v= confirm("Are u sure?");
4.if(v==true){
5.alert("ok");
6.}
7.else{
8.alert("cancel"); }
9.}
10.<input type="button" value="delete record" onclick="msg()"/>
Navigator Object:
<html>
<body>
<h2>JavaScript Navigator Object</h2>
<script>
document.writeln("<br/>navigator.appCodeName: "+navigator.appCodeName);
document.writeln("<br/>navigator.appName: "+navigator.appName);
document.writeln("<br/>navigator.appVersion: "+navigator.appVersion);
document.writeln("<br/>navigator.cookieEnabled: "+navigator.cookieEnabled);
document.writeln("<br/>navigator.language: "+navigator.language);
document.writeln("<br/>navigator.userAgent: "+navigator.userAgent);
document.writeln("<br/>navigator.platform: "+navigator.platform);
document.writeln("<br/>navigator.onLine: "+navigator.onLine);
</script>
</body>
</html>
The navigator object is used for browser detection. It can be used to get browser
information such as appName, appCodeName, userAgent etc.
Screen Object :
<html>
<body>
<script>
document.writeln("<br/>screen.width: "+screen.width);
document.writeln("<br/>screen.height: "+screen.height);
document.writeln("<br/>screen.availWidth: "+screen.availWidth);
document.writeln("<br/>screen.availHeight: "+screen.availHeight);
document.writeln("<br/>screen.colorDepth: "+screen.colorDepth);
document.writeln("<br/>screen.pixelDepth: "+screen.pixelDepth);
</script>
</body>
</html>
The JavaScript screen object holds information of browser screen. It can
be used to display screen width, height, colorDepth, pixelDepth etc.
Assignment:
CHECK THE RECORDED VIDEO
Model Questions:
1. The correct CSS statement is
(a) {color=black(body}
(b) body {color:black}
(c) body:color:=black
(d) {body(color:black)}
2. Which of the following HTML attribute defines
inline styles?
(a) style (b) inlinefont
(c) objectdefine (d) inlinestyles
Model Questions: (Cont.)
3. The correct syntax to write “Hi There” in Javascript is
(a) jscript.write("Hi There")
(b) response.write("Hi There")
(c) print("Hi There")
(d) print.jscript("Hi There")
4. Which of the following syntax is used to write “Hi” in an alert box?
(a) msgBox("Hi")
(b) alert("Hi")
(c) alertmsgBox("Hi")
(d) msgalertBox="Hi"
Next Class:
XML

More Related Content

What's hot

introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5
FLYMAN TECHNOLOGY LIMITED
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
chomas kandar
 
Intro to Javascript and jQuery
Intro to Javascript and jQueryIntro to Javascript and jQuery
Intro to Javascript and jQuery
Shawn Calvert
 

What's hot (20)

introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5
 
Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7
 
Javascript, DOM, browsers and frameworks basics
Javascript, DOM, browsers and frameworks basicsJavascript, DOM, browsers and frameworks basics
Javascript, DOM, browsers and frameworks basics
 
Java Script
Java ScriptJava Script
Java Script
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Intro to Javascript and jQuery
Intro to Javascript and jQueryIntro to Javascript and jQuery
Intro to Javascript and jQuery
 
Intro to jQuery
Intro to jQueryIntro to jQuery
Intro to jQuery
 
Java script Advance
Java script   AdvanceJava script   Advance
Java script Advance
 
FYBSC IT Web Programming Unit III Document Object
FYBSC IT Web Programming Unit III  Document ObjectFYBSC IT Web Programming Unit III  Document Object
FYBSC IT Web Programming Unit III Document Object
 
jQuery
jQueryjQuery
jQuery
 
Web Development Introduction to jQuery
Web Development Introduction to jQueryWeb Development Introduction to jQuery
Web Development Introduction to jQuery
 
Xml part 6
Xml part 6Xml part 6
Xml part 6
 
Javascript
Javascript Javascript
Javascript
 
Part 7
Part 7Part 7
Part 7
 
Introduction towebmatrix
Introduction towebmatrixIntroduction towebmatrix
Introduction towebmatrix
 
CSC103 Web Technologies: HTML, CSS, JS
CSC103 Web Technologies: HTML, CSS, JSCSC103 Web Technologies: HTML, CSS, JS
CSC103 Web Technologies: HTML, CSS, JS
 
Introduction to HTML, CSS, and Javascript
Introduction to HTML, CSS, and JavascriptIntroduction to HTML, CSS, and Javascript
Introduction to HTML, CSS, and Javascript
 

Similar to Internet and Web Technology (CLASS-6) [BOM]

Java script browser objects 1
Java script browser objects 1Java script browser objects 1
Java script browser objects 1
H K
 
01 Introduction - JavaScript Development
01 Introduction - JavaScript Development01 Introduction - JavaScript Development
01 Introduction - JavaScript Development
Tommy Vercety
 
Introduction To Dojo
Introduction To DojoIntroduction To Dojo
Introduction To Dojo
yoavrubin
 

Similar to Internet and Web Technology (CLASS-6) [BOM] (20)

Java script browser objects 1
Java script browser objects 1Java script browser objects 1
Java script browser objects 1
 
01 Introduction - JavaScript Development
01 Introduction - JavaScript Development01 Introduction - JavaScript Development
01 Introduction - JavaScript Development
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGINTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMING
 
JS basics
JS basicsJS basics
JS basics
 
Javascript.ppt
Javascript.pptJavascript.ppt
Javascript.ppt
 
Client-side JavaScript
Client-side JavaScriptClient-side JavaScript
Client-side JavaScript
 
13488117.ppt
13488117.ppt13488117.ppt
13488117.ppt
 
13488117.ppt
13488117.ppt13488117.ppt
13488117.ppt
 
Unit3.pptx
Unit3.pptxUnit3.pptx
Unit3.pptx
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)
 
Devoxx 2014-webComponents
Devoxx 2014-webComponentsDevoxx 2014-webComponents
Devoxx 2014-webComponents
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Introduction To Dojo
Introduction To DojoIntroduction To Dojo
Introduction To Dojo
 
Javascript 2
Javascript 2Javascript 2
Javascript 2
 
Unit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascriptUnit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascript
 
Client Web
Client WebClient Web
Client Web
 
Jquery Basics
Jquery BasicsJquery Basics
Jquery Basics
 
Javascript Templating
Javascript TemplatingJavascript Templating
Javascript Templating
 
Practical JavaScript Programming - Session 4/8
Practical JavaScript Programming - Session 4/8Practical JavaScript Programming - Session 4/8
Practical JavaScript Programming - Session 4/8
 

More from Ayes Chinmay

More from Ayes Chinmay (8)

Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
 
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
 
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
 
Internet and Web Technology (CLASS-7) [XML and AJAX] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-7) [XML and AJAX] | NIC/NIELIT Web TechnologyInternet and Web Technology (CLASS-7) [XML and AJAX] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-7) [XML and AJAX] | NIC/NIELIT Web Technology
 
Internet and Web Technology (CLASS-3) [HTML & CSS]
Internet and Web Technology (CLASS-3) [HTML & CSS] Internet and Web Technology (CLASS-3) [HTML & CSS]
Internet and Web Technology (CLASS-3) [HTML & CSS]
 
Internet and Web Technology (CLASS-2) [HTTP & HTML]
Internet and Web Technology (CLASS-2) [HTTP & HTML]Internet and Web Technology (CLASS-2) [HTTP & HTML]
Internet and Web Technology (CLASS-2) [HTTP & HTML]
 
Internet and Web Technology (CLASS-1) [Introduction]
Internet and Web Technology (CLASS-1) [Introduction]Internet and Web Technology (CLASS-1) [Introduction]
Internet and Web Technology (CLASS-1) [Introduction]
 

Recently uploaded

plant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsplant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated crops
parmarsneha2
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
YibeltalNibretu
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 

Recently uploaded (20)

The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
plant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsplant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated crops
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
 
NLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxNLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptx
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 

Internet and Web Technology (CLASS-6) [BOM]

  • 2. IWT Syllabus: Module 2: Java Script Scripting: Java script: Introduction, statements, comments, variables, operators, documents, forms, functions, objects, events, Strings, Numbers, Arrays, Date, Math, Random, Loops, Regxp, errors, this, Let, Const., classes, debugging . The HTML DOM (Document Object Model) Introduction, DOM Methods, DOM Document, DOM Elements , DOM HTML, DOM CSS, DOM Events, DOM Navigation, DOM Nodes , DOM Nodelist The Browser Object Model (BOM) The Window Object, Window Size, Window History, Window Navigator, Browser Detection, JavaScript Timing Events, Cookies, Working on Cookies using Java script.
  • 3. BROWSER OBJECT MODEL:  The Browser Object Model (BOM) is used to interact with the browser.  The default object of browser is window means you can call all the functions of window by specifying window or directly.  window.alert("hello javatpoint"); is same as alert("hello javatpoint"); .
  • 6. BOM: 1. The top level object in the BOM is the window object. The window object represents the browser window. All other browser objects are contained within the window object. The window object includes a number of properties and methods that can be used to control the Web browser. The window object along with its properties and methods are discussed in more detail in a later section. 2. The document object represents the Web page displayed in the browser. All elements on a Web page including HTML tags are contained within the document object. Since the document object is often considered the most important part of the BOM, it is represented by its own object model called the Document Object Model or DOM. The DOM will be discussed in more detailed in later tutorials. 3. Other objects of the browser object model include the navigator object, the screen object, that contains information about the visitor's screen, the history object, that is part of the window object and contains the URLs that have been visited by the user, and the location object that contains information about the current URL. Within the window object are document objects representing elements within the Web pages.
  • 7. BOM Objects: Reference Object window The main browser window window.navigator Information about the browser itself window.screen The user's screen window.history URLs visited by a user window.location The current URL window.document (document) The document appearing in the main browser window document.getElementById("id") An HTML element appearing in a document and identified by its assigned id value.
  • 8. Window Object: The window object represents a window in browser. An object of window is created automatically by the browser. Window is the object of browser, it is not the object of javascript. The javascript objects are string, array, date etc. <script type="text/javascript"> function msg(){ alert("Hello Alert Box"); } </script> <input type="button" value="click" onclick="msg()"/> <script type="text/javascript"> function msg(){ var v= prompt("Who are you?"); alert("I am "+v); } </script> <input type="button" value="click" onclick="msg()" />
  • 9. Window Object: <script type="text/javascript"> function msg(){ var v= prompt("Who are you?"); alert("I am "+v); } </script> <input type="button“ value="click" onclick="msg()"/> 1.<script type="text/javascript"> 2.function msg(){ 3.var v= confirm("Are u sure?"); 4.if(v==true){ 5.alert("ok"); 6.} 7.else{ 8.alert("cancel"); } 9.} 10.<input type="button" value="delete record" onclick="msg()"/>
  • 10. Navigator Object: <html> <body> <h2>JavaScript Navigator Object</h2> <script> document.writeln("<br/>navigator.appCodeName: "+navigator.appCodeName); document.writeln("<br/>navigator.appName: "+navigator.appName); document.writeln("<br/>navigator.appVersion: "+navigator.appVersion); document.writeln("<br/>navigator.cookieEnabled: "+navigator.cookieEnabled); document.writeln("<br/>navigator.language: "+navigator.language); document.writeln("<br/>navigator.userAgent: "+navigator.userAgent); document.writeln("<br/>navigator.platform: "+navigator.platform); document.writeln("<br/>navigator.onLine: "+navigator.onLine); </script> </body> </html> The navigator object is used for browser detection. It can be used to get browser information such as appName, appCodeName, userAgent etc.
  • 11. Screen Object : <html> <body> <script> document.writeln("<br/>screen.width: "+screen.width); document.writeln("<br/>screen.height: "+screen.height); document.writeln("<br/>screen.availWidth: "+screen.availWidth); document.writeln("<br/>screen.availHeight: "+screen.availHeight); document.writeln("<br/>screen.colorDepth: "+screen.colorDepth); document.writeln("<br/>screen.pixelDepth: "+screen.pixelDepth); </script> </body> </html> The JavaScript screen object holds information of browser screen. It can be used to display screen width, height, colorDepth, pixelDepth etc.
  • 13. Model Questions: 1. The correct CSS statement is (a) {color=black(body} (b) body {color:black} (c) body:color:=black (d) {body(color:black)} 2. Which of the following HTML attribute defines inline styles? (a) style (b) inlinefont (c) objectdefine (d) inlinestyles
  • 14. Model Questions: (Cont.) 3. The correct syntax to write “Hi There” in Javascript is (a) jscript.write("Hi There") (b) response.write("Hi There") (c) print("Hi There") (d) print.jscript("Hi There") 4. Which of the following syntax is used to write “Hi” in an alert box? (a) msgBox("Hi") (b) alert("Hi") (c) alertmsgBox("Hi") (d) msgalertBox="Hi"