SlideShare a Scribd company logo
1 of 8
Window object
A window object is a top level object for each
document, location and history object
Syntax:
windowVar = window.open
(“URL”, “window name”, ”window features”)
Window features
Option Values Description
1. Height Integer Used to set the height of the new window
2. Width Integer Used to set the width of the new window
3. Location Yes/no or 1/0 Used to display/ hide the location bar in the new
window
4. Resizable Yes/no or 1/0 If resizable is set to yes, window resizing can be
done by users. By default window resizing is disabled
5. Menu bar Yes/no or 1/0 Used to display/hide the menu bar
6. Scrollbars Yes/no or 1/0 Used to display/hide scroll bars
7. Status Yes/no or 1/0 Used to display/hide status bar
8. Toolbar Yes/no or 1/0 Used to display/hide the tool bar
Window object property
Property Description
closed Returns a Boolean value indicating whether a window has been
closed or not
status Sets or returns the text in the status bar of a window
defaultStatus Sets or returns the default text in the status bar of a window
document Returns the Document object for the window
frames Returns all frame elements in the current window
history Returns the History object for the window
length Returns the number of all frame elements in the current window
location Returns the Location object for the window
name Sets or returns the name of a window
parent Returns the parent window of the current window
Window object functions
Method Description
alert() Displays an alert box with a message and an OK button
confirm() Displays a dialog box with a message and an OK and a
Cancel button
prompt() Displays a dialog box that prompts the visitor for input
open() Opens a new browser window
close() Closes the current window
scroll(x ,y) This method is used to move a window at a new
position
blur() Removes focus from the current window
focus() Sets focus to the current window
The form object
• The form takes a number of attributes:
– Name: the name of the form
– Method: the method by which data is sent to
server (get and post)
– Action: the URL of script to which data entered by
the user will be sent.
– onsubmit: the form is submitted to the server.
– onclick: the event is triggered when the user clicks
on that element.
– onreset: resets the form
The browser object
Property Description
appCodeName Returns the code name of the browser
appName Returns the name of the browser
appVersion Returns the version information of the browser
language Returns the language of the browser
platform Returns for which platform the browser is compiled
History object
Property Description
next Represents next page URL in the history object list, if any.
Previous Represents previous page URL in the history object list, if any
Current Represents current page URL in the history object list
Length Property length returns the number of objects in the history list
Date object
Method Description
date() Returns the current date and time
getDate() Returns the day of the month (from 1-31)
getDay() Returns the day of the week (from 0-6)
getMonth() Returns the month (from 0-11)
getHours() Returns the hour (from 0-23)
parse() Parses a date string and returns the number of
milliseconds since January 1, 1970
setDate() Sets the day of the month of a date object
setMonth() Sets the month of a date object
setHours() Sets the hour of a date object
toString() Converts a Date object to a string

More Related Content

What's hot

JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object ModelWebStackAcademy
 
Android activity
Android activityAndroid activity
Android activityKrazy Koder
 
android activity
android activityandroid activity
android activityDeepa Rani
 
Servlet and servlet life cycle
Servlet and servlet life cycleServlet and servlet life cycle
Servlet and servlet life cycleDhruvin Nakrani
 
Java exception handling
Java exception handlingJava exception handling
Java exception handlingBHUVIJAYAVELU
 
Unit-1 awt advanced java programming
Unit-1 awt advanced java programmingUnit-1 awt advanced java programming
Unit-1 awt advanced java programmingAmol Gaikwad
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state managementpriya Nithya
 
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 javascriptzahid7578
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptWalid Ashraf
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation Salman Memon
 

What's hot (20)

JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
CSS media types
CSS media typesCSS media types
CSS media types
 
Android activity
Android activityAndroid activity
Android activity
 
Basics of JavaScript
Basics of JavaScriptBasics of JavaScript
Basics of JavaScript
 
Java awt
Java awtJava awt
Java awt
 
Css selectors
Css selectorsCss selectors
Css selectors
 
JavaScript: Events Handling
JavaScript: Events HandlingJavaScript: Events Handling
JavaScript: Events Handling
 
Fragment
Fragment Fragment
Fragment
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
android activity
android activityandroid activity
android activity
 
jQuery
jQueryjQuery
jQuery
 
Servlet and servlet life cycle
Servlet and servlet life cycleServlet and servlet life cycle
Servlet and servlet life cycle
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Java exception handling
Java exception handlingJava exception handling
Java exception handling
 
Unit-1 awt advanced java programming
Unit-1 awt advanced java programmingUnit-1 awt advanced java programming
Unit-1 awt advanced java programming
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state management
 
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
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 

Similar to Window object

12. session 12 java script objects
12. session 12   java script objects12. session 12   java script objects
12. session 12 java script objectsPhúc Đỗ
 
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)WebStackAcademy
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGINTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGProf Ansari
 
The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84Mahmoud Samir Fayed
 
Java script browser objects 1
Java script browser objects 1Java script browser objects 1
Java script browser objects 1H K
 
Transmogrifier: Migrating to Plone with less pain
Transmogrifier: Migrating to Plone with less painTransmogrifier: Migrating to Plone with less pain
Transmogrifier: Migrating to Plone with less painLennart Regebro
 
Booa8 Slide 11
Booa8 Slide 11Booa8 Slide 11
Booa8 Slide 11oswchavez
 
Java script frame window
Java script frame windowJava script frame window
Java script frame windowH K
 

Similar to Window object (20)

12. session 12 java script objects
12. session 12   java script objects12. session 12   java script objects
12. session 12 java script objects
 
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)
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGINTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMING
 
Pushing the Web: Interesting things to Know
Pushing the Web: Interesting things to KnowPushing the Web: Interesting things to Know
Pushing the Web: Interesting things to Know
 
The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.2 book - Part 5 of 84
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
Javascript dom
Javascript domJavascript dom
Javascript dom
 
Java script browser objects 1
Java script browser objects 1Java script browser objects 1
Java script browser objects 1
 
08ui.pptx
08ui.pptx08ui.pptx
08ui.pptx
 
Transmogrifier: Migrating to Plone with less pain
Transmogrifier: Migrating to Plone with less painTransmogrifier: Migrating to Plone with less pain
Transmogrifier: Migrating to Plone with less pain
 
Javascript
Javascript Javascript
Javascript
 
13488117.ppt
13488117.ppt13488117.ppt
13488117.ppt
 
13488117.ppt
13488117.ppt13488117.ppt
13488117.ppt
 
JavaScript Basics
JavaScript BasicsJavaScript Basics
JavaScript Basics
 
Prototype Framework
Prototype FrameworkPrototype Framework
Prototype Framework
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
Booa8 Slide 11
Booa8 Slide 11Booa8 Slide 11
Booa8 Slide 11
 
JAVA AWT
JAVA AWTJAVA AWT
JAVA AWT
 
Java script frame window
Java script frame windowJava script frame window
Java script frame window
 
unit3.2 (1).pptx
unit3.2 (1).pptxunit3.2 (1).pptx
unit3.2 (1).pptx
 

More from preetikapri1

types of testing in software engineering
types of testing in software engineering types of testing in software engineering
types of testing in software engineering preetikapri1
 
structures in C and Union in C, enumerated datatype
structures in C and Union in C, enumerated datatypestructures in C and Union in C, enumerated datatype
structures in C and Union in C, enumerated datatypepreetikapri1
 
bit wise operators and I/O operations in C
bit wise operators and I/O operations in Cbit wise operators and I/O operations in C
bit wise operators and I/O operations in Cpreetikapri1
 
consumer oriented applications
consumer oriented applicationsconsumer oriented applications
consumer oriented applicationspreetikapri1
 
architecture framework for ecommerce
architecture framework for ecommercearchitecture framework for ecommerce
architecture framework for ecommercepreetikapri1
 
impact of ecommerce on traditional means
impact of ecommerce on traditional means impact of ecommerce on traditional means
impact of ecommerce on traditional means preetikapri1
 
electronic data interchange
electronic data interchange electronic data interchange
electronic data interchange preetikapri1
 
consumer oriented applications
consumer oriented applicationsconsumer oriented applications
consumer oriented applicationspreetikapri1
 

More from preetikapri1 (20)

Forces
ForcesForces
Forces
 
software quality
software qualitysoftware quality
software quality
 
UML model
UML model UML model
UML model
 
Er diagrams
Er diagramsEr diagrams
Er diagrams
 
Data flow diagram
Data flow diagramData flow diagram
Data flow diagram
 
types of testing in software engineering
types of testing in software engineering types of testing in software engineering
types of testing in software engineering
 
structures in C and Union in C, enumerated datatype
structures in C and Union in C, enumerated datatypestructures in C and Union in C, enumerated datatype
structures in C and Union in C, enumerated datatype
 
bit wise operators and I/O operations in C
bit wise operators and I/O operations in Cbit wise operators and I/O operations in C
bit wise operators and I/O operations in C
 
Ms access
Ms access Ms access
Ms access
 
Functions
FunctionsFunctions
Functions
 
C programming
C programmingC programming
C programming
 
C preprocesor
C preprocesorC preprocesor
C preprocesor
 
DTD elements
DTD elementsDTD elements
DTD elements
 
Html
HtmlHtml
Html
 
Css font
Css fontCss font
Css font
 
consumer oriented applications
consumer oriented applicationsconsumer oriented applications
consumer oriented applications
 
architecture framework for ecommerce
architecture framework for ecommercearchitecture framework for ecommerce
architecture framework for ecommerce
 
impact of ecommerce on traditional means
impact of ecommerce on traditional means impact of ecommerce on traditional means
impact of ecommerce on traditional means
 
electronic data interchange
electronic data interchange electronic data interchange
electronic data interchange
 
consumer oriented applications
consumer oriented applicationsconsumer oriented applications
consumer oriented applications
 

Recently uploaded

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

Window object

  • 1. Window object A window object is a top level object for each document, location and history object Syntax: windowVar = window.open (“URL”, “window name”, ”window features”)
  • 2. Window features Option Values Description 1. Height Integer Used to set the height of the new window 2. Width Integer Used to set the width of the new window 3. Location Yes/no or 1/0 Used to display/ hide the location bar in the new window 4. Resizable Yes/no or 1/0 If resizable is set to yes, window resizing can be done by users. By default window resizing is disabled 5. Menu bar Yes/no or 1/0 Used to display/hide the menu bar 6. Scrollbars Yes/no or 1/0 Used to display/hide scroll bars 7. Status Yes/no or 1/0 Used to display/hide status bar 8. Toolbar Yes/no or 1/0 Used to display/hide the tool bar
  • 3. Window object property Property Description closed Returns a Boolean value indicating whether a window has been closed or not status Sets or returns the text in the status bar of a window defaultStatus Sets or returns the default text in the status bar of a window document Returns the Document object for the window frames Returns all frame elements in the current window history Returns the History object for the window length Returns the number of all frame elements in the current window location Returns the Location object for the window name Sets or returns the name of a window parent Returns the parent window of the current window
  • 4. Window object functions Method Description alert() Displays an alert box with a message and an OK button confirm() Displays a dialog box with a message and an OK and a Cancel button prompt() Displays a dialog box that prompts the visitor for input open() Opens a new browser window close() Closes the current window scroll(x ,y) This method is used to move a window at a new position blur() Removes focus from the current window focus() Sets focus to the current window
  • 5. The form object • The form takes a number of attributes: – Name: the name of the form – Method: the method by which data is sent to server (get and post) – Action: the URL of script to which data entered by the user will be sent. – onsubmit: the form is submitted to the server. – onclick: the event is triggered when the user clicks on that element. – onreset: resets the form
  • 6. The browser object Property Description appCodeName Returns the code name of the browser appName Returns the name of the browser appVersion Returns the version information of the browser language Returns the language of the browser platform Returns for which platform the browser is compiled
  • 7. History object Property Description next Represents next page URL in the history object list, if any. Previous Represents previous page URL in the history object list, if any Current Represents current page URL in the history object list Length Property length returns the number of objects in the history list
  • 8. Date object Method Description date() Returns the current date and time getDate() Returns the day of the month (from 1-31) getDay() Returns the day of the week (from 0-6) getMonth() Returns the month (from 0-11) getHours() Returns the hour (from 0-23) parse() Parses a date string and returns the number of milliseconds since January 1, 1970 setDate() Sets the day of the month of a date object setMonth() Sets the month of a date object setHours() Sets the hour of a date object toString() Converts a Date object to a string