SlideShare a Scribd company logo
JavaScript Basics
 JavaScript is a programming language designed for Web
pages that describes data and procedures in terms of
objects, methods, and properties, rather than variables,
routines, and statements.
 Unlike HTML, JavaScript is case sensitive. JavaScript is
plain text and when created in a text editor needs to be
saved as a text (ASCII) file.
 Newer editions of full featured WYSIWYG HTML editors
support some Java Scripting, and often enable coding in
their page source windows.
 If you begin doing JavaScript by cutting and pasting you
may often need to modify a few parts of the scripts, such
as names of objects. Many JavaScript's are available on
the WWW, and links to some popular JavaScript sites are
provided below.
 A team of Netscape and Sun Microsystems developers
originally created JavaScript.
 In 1998 the European Computer Manfacturers
Association (ECMA) announced the adoption of a
standard Internet scripting language based on JavaScript
1.1 that resolved the incompatibilities that existed in
scripting between various browser implementations.
Microsoft, Netscape,
 and other browser companies agreed to follow the
specification. The standard is called ECMAScript,
though the common name, JavaScript, has persisted.
The most recent version of JavaScript is 1.3 (ECMA-
262).
 Version 1.3 requires Netscape 4.06 or
 newer and Microsoft Internet Explorer (IE) 4.0 or newer.
 IE actually uses JScript, a modified version of JavaScript
that does not support all JavaScript commands.
 I therefore recommend testing your pages, and using a
Netscape browser when viewing Web pages with
JavaScripting.
 JavaScript can enhance the dynamics and interactive
features of Web pages by enabling calculations,
checking forms, writing interactive games, adding
special effects, customizing graphics selections, data
binding, and more. JavaScript is an interpreted
language that runs in the user's browser
 . JavaScript code works on any computer platform
with a JavaScript capable browser, such as
Navigator 2.0 or later,
 or Microsoft Internet Explorer 3.0 or later.
JavaScript capable browsers may allow disabling
JavaScript in their preferences. JavaScript is easier
to use than are programming languages.
 With JavaScript, developers do not need to compile
a program or work with a developer's kit. Also, the
many JavaScripts available on the Internet can
easily be modified and adapted to your own pages.
JavaScript programming uses specialized terminology.
◦ Dot Syntax
◦ Objects.
◦ Properties
◦ Methods
◦ Events
◦ Functions
◦ Variables
◦ Expressions
◦ Operators
 . Actions by page users trigger event handler
commands in the JavaScript. The program will
then perform whatever commands are assigned to
the event
 . Common event handlers are listed in the following table.
Event Handler Action
onAbort The user stopped loading a page
onBlur The user moves from an object
onChange The user changed an object
onClick The user mouse-clicked an object
onError An error occurred in the script
Event Handler Action
onMouseover The cursor has moved over the object
onMouseout The cursor has moved off the object
onSelect The user selected the object
onSubmit The user submitted a form
onUnload The user leaves the window
onFocus The user activates an object
onLoad The object has been loaded
 JavaScript scripts can be embedded in an HTML page or
can reside in a separate page.
 JavaScript is often placed in the <head> section of the
HTML document, but can also be placed in the <body>.
 JavaScript object attributes can also be placed in HTML
element tags. You can use JavaScript in an HTML
document in the following ways:
 As statements and functions within <script> and
</script> tags.
 By specifying a file as the JavaScript source using the
<src> attribute of the <script> element.
 By specifying a JavaScript expression as the value of an
HTML attribute and as event handlers within certain
other HTML tags.
 The first method places the JavaScript between the
<script> and </script> tags. When specifying a script
only the tags <script> and </script> are essential.
 It is recommendable to specify the script language as an
attribute of the script element. Browsers currently
assume JavaScript, but other programming languages
could become popular in the future.
 The standard to open scripting is <script
language="JavaScript">.
 The script language attribute can also specify the
version of JavaScript.
 It is also recommendable to specify the MIME type of
the script, to denote to the browser that the script is
plain text. This is accomplished with the attribute
type="text/javascript".
 The following example script redirects the browser to a page,
named javascript.html. The object is window, the variable property
is location, and the value equals the specified HTML file.
 <script language="javascript1.2" type="text/javascript">
<!-- Begin hiding script
window.location="javascript.html"
// End hiding script-->
</script>
 In the following examples I do not include the
<script>and </script> tags,
 HTML tags or comment lines. These examples are
employed using the methods described above.
 The first example is a method for displaying text in a
Web page.
 The syntax for this method can also be writeIn, a
method that attaches a break to each line of text.

 document.write("This is where you place the text
that will appear in the Web page.")
 The write method also permits use of HTML tags
within the parenthesis, as seen below.
 document.write("<b>Hello World.</b>")
 The writeIn method should be used with
preformatted text.
 var month = April;
var date = fifteenth;
 document.write("Remember, your taxes are due on
" + month + date);

More Related Content

What's hot

JavaScript with Syntax & Implementation
JavaScript with Syntax & ImplementationJavaScript with Syntax & Implementation
JavaScript with Syntax & Implementation
Soumen Santra
 
Java script
Java scriptJava script
Java script
reddivarihareesh
 
Java script
Java scriptJava script
Java script
umesh patil
 
1. java script language fundamentals
1. java script language fundamentals1. java script language fundamentals
1. java script language fundamentals
Rajiv Gupta
 
Presentation
PresentationPresentation
Presentation
Chetan Kataria
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scriptsch samaram
 
Java scripts
Java scriptsJava scripts
Java scripts
Capgemini India
 
Javascript
JavascriptJavascript
Javascript
Mozxai
 
Javascript - Ebook (A Quick Guide)
Javascript - Ebook (A Quick Guide)Javascript - Ebook (A Quick Guide)
Javascript - Ebook (A Quick Guide)
sourav newatia
 
Introduction to Javascript programming
Introduction to Javascript programmingIntroduction to Javascript programming
Introduction to Javascript programming
Fulvio Corno
 
Java script
Java scriptJava script
Java script
Anuj Singh Rajput
 
Java Script An Introduction By HWA
Java Script An Introduction By HWAJava Script An Introduction By HWA
Java Script An Introduction By HWA
Emma Wood
 
INFO 3775 Chapter 2 Part 1
INFO 3775 Chapter 2 Part 1INFO 3775 Chapter 2 Part 1
INFO 3775 Chapter 2 Part 1Jeff Byrnes
 
Java script Basic
Java script BasicJava script Basic
Java script Basic
Jaya Kumari
 
Java script Session No 1
Java script Session No 1Java script Session No 1
Java script Session No 1
Saif Ullah Dar
 
Ui automation
Ui automationUi automation
Ui automation
test test
 

What's hot (19)

Lect35 javascript
Lect35 javascriptLect35 javascript
Lect35 javascript
 
JavaScript with Syntax & Implementation
JavaScript with Syntax & ImplementationJavaScript with Syntax & Implementation
JavaScript with Syntax & Implementation
 
Java script
Java scriptJava script
Java script
 
Java script
Java scriptJava script
Java script
 
Test2
Test2Test2
Test2
 
1. java script language fundamentals
1. java script language fundamentals1. java script language fundamentals
1. java script language fundamentals
 
Presentation
PresentationPresentation
Presentation
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scripts
 
Java scripts
Java scriptsJava scripts
Java scripts
 
Javascript
JavascriptJavascript
Javascript
 
Javascript - Ebook (A Quick Guide)
Javascript - Ebook (A Quick Guide)Javascript - Ebook (A Quick Guide)
Javascript - Ebook (A Quick Guide)
 
Introduction to Javascript programming
Introduction to Javascript programmingIntroduction to Javascript programming
Introduction to Javascript programming
 
Java script
Java scriptJava script
Java script
 
Presentation
PresentationPresentation
Presentation
 
Java Script An Introduction By HWA
Java Script An Introduction By HWAJava Script An Introduction By HWA
Java Script An Introduction By HWA
 
INFO 3775 Chapter 2 Part 1
INFO 3775 Chapter 2 Part 1INFO 3775 Chapter 2 Part 1
INFO 3775 Chapter 2 Part 1
 
Java script Basic
Java script BasicJava script Basic
Java script Basic
 
Java script Session No 1
Java script Session No 1Java script Session No 1
Java script Session No 1
 
Ui automation
Ui automationUi automation
Ui automation
 

Viewers also liked

CV_Mark Fayle _Brief
CV_Mark Fayle _BriefCV_Mark Fayle _Brief
CV_Mark Fayle _BriefMark Fayle
 
Evaluation 3
Evaluation 3Evaluation 3
Evaluation 3
Anya Wagstaff
 
Global Health and Human Hair
Global Health and Human HairGlobal Health and Human Hair
Global Health and Human Hair
edwarddamon
 
Question 1
Question 1Question 1
Question 1
Anya Wagstaff
 
Communify - Unit Testing
Communify - Unit TestingCommunify - Unit Testing
Communify - Unit Testing
digitalsgirona
 
NaviSolutions, de ERP oplossing voor uw groei!
NaviSolutions, de ERP oplossing voor uw groei!NaviSolutions, de ERP oplossing voor uw groei!
NaviSolutions, de ERP oplossing voor uw groei!
IT Solutions
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
Shrijan Tiwari
 
喜多福香蒜油
喜多福香蒜油喜多福香蒜油
喜多福香蒜油
彥欣 李
 
Do's and Dont's for Your 341 Meeting of Creditors
Do's and Dont's for Your 341 Meeting of CreditorsDo's and Dont's for Your 341 Meeting of Creditors
Do's and Dont's for Your 341 Meeting of Creditors
Joe Pioletti
 
Επιληψία και Ψυχοθεραπεία Δημιουργική προσαρμογή
Επιληψία και Ψυχοθεραπεία   Δημιουργική προσαρμογήΕπιληψία και Ψυχοθεραπεία   Δημιουργική προσαρμογή
Επιληψία και Ψυχοθεραπεία Δημιουργική προσαρμογή
joannakato
 
Rimskoe
RimskoeRimskoe
Rimskoe
Andrey Ivanov
 
The Fastest Storage solution, HFT report
The Fastest Storage solution, HFT reportThe Fastest Storage solution, HFT report
The Fastest Storage solution, HFT report
Simon Hsu
 

Viewers also liked (16)

CV_Mark Fayle _Brief
CV_Mark Fayle _BriefCV_Mark Fayle _Brief
CV_Mark Fayle _Brief
 
Evaluation 3
Evaluation 3Evaluation 3
Evaluation 3
 
Global Health and Human Hair
Global Health and Human HairGlobal Health and Human Hair
Global Health and Human Hair
 
Question 1
Question 1Question 1
Question 1
 
Communify - Unit Testing
Communify - Unit TestingCommunify - Unit Testing
Communify - Unit Testing
 
NaviSolutions, de ERP oplossing voor uw groei!
NaviSolutions, de ERP oplossing voor uw groei!NaviSolutions, de ERP oplossing voor uw groei!
NaviSolutions, de ERP oplossing voor uw groei!
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
喜多福香蒜油
喜多福香蒜油喜多福香蒜油
喜多福香蒜油
 
IJISET_V2_I6_90
IJISET_V2_I6_90IJISET_V2_I6_90
IJISET_V2_I6_90
 
Do's and Dont's for Your 341 Meeting of Creditors
Do's and Dont's for Your 341 Meeting of CreditorsDo's and Dont's for Your 341 Meeting of Creditors
Do's and Dont's for Your 341 Meeting of Creditors
 
intMutual funds
intMutual fundsintMutual funds
intMutual funds
 
Επιληψία και Ψυχοθεραπεία Δημιουργική προσαρμογή
Επιληψία και Ψυχοθεραπεία   Δημιουργική προσαρμογήΕπιληψία και Ψυχοθεραπεία   Δημιουργική προσαρμογή
Επιληψία και Ψυχοθεραπεία Δημιουργική προσαρμογή
 
Rimskoe
RimskoeRimskoe
Rimskoe
 
Education in-pakistan
Education in-pakistanEducation in-pakistan
Education in-pakistan
 
CAFR 2012
CAFR 2012CAFR 2012
CAFR 2012
 
The Fastest Storage solution, HFT report
The Fastest Storage solution, HFT reportThe Fastest Storage solution, HFT report
The Fastest Storage solution, HFT report
 

Similar to Session vii(java scriptbasics)

JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
Go4Guru
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academy
actanimation
 
CSC PPT 12.pptx
CSC PPT 12.pptxCSC PPT 12.pptx
CSC PPT 12.pptx
DrRavneetSingh
 
Java Script - A New Look
Java Script - A New LookJava Script - A New Look
Java Script - A New Lookrumsan
 
8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation
JohnLagman3
 
JavaScript - Getting Started.pptx
JavaScript - Getting Started.pptxJavaScript - Getting Started.pptx
JavaScript - Getting Started.pptx
JonnJorellPunto
 
Javascript
JavascriptJavascript
Javascript
Nagarajan
 
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
Bhavsingh Maloth
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
Bhavsingh Maloth
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
Mohammed Hussein
 
Introduction to java script
Introduction to java scriptIntroduction to java script
Introduction to java script
nanjil1984
 
Java scipt
Java sciptJava scipt
Unit 4 Java script.pptx
Unit 4 Java script.pptxUnit 4 Java script.pptx
Unit 4 Java script.pptx
Gangesh8
 
Iwt note(module 2)
Iwt note(module 2)Iwt note(module 2)
Iwt note(module 2)SANTOSH RATH
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
ApxicTechnologies1
 
JavaScript
JavaScriptJavaScript
JavaScript
Gulbir Chaudhary
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
DHTMLExtreme
 
Basic Java script handouts for students
Basic Java script handouts for students Basic Java script handouts for students
Basic Java script handouts for students
shafiq sangi
 
Java script202
Java script202Java script202
Java script202Wasiq Zia
 

Similar to Session vii(java scriptbasics) (20)

JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academy
 
CSC PPT 12.pptx
CSC PPT 12.pptxCSC PPT 12.pptx
CSC PPT 12.pptx
 
Java Script - A New Look
Java Script - A New LookJava Script - A New Look
Java Script - A New Look
 
8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
 
JavaScript - Getting Started.pptx
JavaScript - Getting Started.pptxJavaScript - Getting Started.pptx
JavaScript - Getting Started.pptx
 
Javascript
JavascriptJavascript
Javascript
 
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
Introduction to java script
Introduction to java scriptIntroduction to java script
Introduction to java script
 
Java scipt
Java sciptJava scipt
Java scipt
 
Unit 4 Java script.pptx
Unit 4 Java script.pptxUnit 4 Java script.pptx
Unit 4 Java script.pptx
 
Iwt note(module 2)
Iwt note(module 2)Iwt note(module 2)
Iwt note(module 2)
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
 
Basic Java script handouts for students
Basic Java script handouts for students Basic Java script handouts for students
Basic Java script handouts for students
 
Java script202
Java script202Java script202
Java script202
 

More from Shrijan Tiwari

ASPX Session xi(page lifecycle)
ASPX Session xi(page lifecycle)ASPX Session xi(page lifecycle)
ASPX Session xi(page lifecycle)
Shrijan Tiwari
 
Session x(ado.net)
Session x(ado.net)Session x(ado.net)
Session x(ado.net)
Shrijan Tiwari
 
Session viii(state mngtserver)
Session viii(state mngtserver)Session viii(state mngtserver)
Session viii(state mngtserver)
Shrijan Tiwari
 
Session viii(state mngtclient)
Session viii(state mngtclient)Session viii(state mngtclient)
Session viii(state mngtclient)
Shrijan Tiwari
 
Session vi(user control)
Session vi(user control)Session vi(user control)
Session vi(user control)
Shrijan Tiwari
 
Session v(css)
Session v(css)Session v(css)
Session v(css)
Shrijan Tiwari
 
Session ix(database)
Session ix(database)Session ix(database)
Session ix(database)
Shrijan Tiwari
 
Session iv(master pages)
Session iv(master pages)Session iv(master pages)
Session iv(master pages)
Shrijan Tiwari
 
Session iii(server controls)
Session iii(server controls)Session iii(server controls)
Session iii(server controls)
Shrijan Tiwari
 
Session ii(html)
Session ii(html)Session ii(html)
Session ii(html)
Shrijan Tiwari
 
Session i(introduction)
Session i(introduction)Session i(introduction)
Session i(introduction)
Shrijan Tiwari
 

More from Shrijan Tiwari (11)

ASPX Session xi(page lifecycle)
ASPX Session xi(page lifecycle)ASPX Session xi(page lifecycle)
ASPX Session xi(page lifecycle)
 
Session x(ado.net)
Session x(ado.net)Session x(ado.net)
Session x(ado.net)
 
Session viii(state mngtserver)
Session viii(state mngtserver)Session viii(state mngtserver)
Session viii(state mngtserver)
 
Session viii(state mngtclient)
Session viii(state mngtclient)Session viii(state mngtclient)
Session viii(state mngtclient)
 
Session vi(user control)
Session vi(user control)Session vi(user control)
Session vi(user control)
 
Session v(css)
Session v(css)Session v(css)
Session v(css)
 
Session ix(database)
Session ix(database)Session ix(database)
Session ix(database)
 
Session iv(master pages)
Session iv(master pages)Session iv(master pages)
Session iv(master pages)
 
Session iii(server controls)
Session iii(server controls)Session iii(server controls)
Session iii(server controls)
 
Session ii(html)
Session ii(html)Session ii(html)
Session ii(html)
 
Session i(introduction)
Session i(introduction)Session i(introduction)
Session i(introduction)
 

Recently uploaded

Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 

Recently uploaded (20)

Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 

Session vii(java scriptbasics)

  • 2.  JavaScript is a programming language designed for Web pages that describes data and procedures in terms of objects, methods, and properties, rather than variables, routines, and statements.  Unlike HTML, JavaScript is case sensitive. JavaScript is plain text and when created in a text editor needs to be saved as a text (ASCII) file.
  • 3.  Newer editions of full featured WYSIWYG HTML editors support some Java Scripting, and often enable coding in their page source windows.  If you begin doing JavaScript by cutting and pasting you may often need to modify a few parts of the scripts, such as names of objects. Many JavaScript's are available on the WWW, and links to some popular JavaScript sites are provided below.
  • 4.  A team of Netscape and Sun Microsystems developers originally created JavaScript.  In 1998 the European Computer Manfacturers Association (ECMA) announced the adoption of a standard Internet scripting language based on JavaScript 1.1 that resolved the incompatibilities that existed in scripting between various browser implementations. Microsoft, Netscape,
  • 5.  and other browser companies agreed to follow the specification. The standard is called ECMAScript, though the common name, JavaScript, has persisted. The most recent version of JavaScript is 1.3 (ECMA- 262).
  • 6.  Version 1.3 requires Netscape 4.06 or  newer and Microsoft Internet Explorer (IE) 4.0 or newer.  IE actually uses JScript, a modified version of JavaScript that does not support all JavaScript commands.  I therefore recommend testing your pages, and using a Netscape browser when viewing Web pages with JavaScripting.
  • 7.  JavaScript can enhance the dynamics and interactive features of Web pages by enabling calculations, checking forms, writing interactive games, adding special effects, customizing graphics selections, data binding, and more. JavaScript is an interpreted language that runs in the user's browser
  • 8.  . JavaScript code works on any computer platform with a JavaScript capable browser, such as Navigator 2.0 or later,  or Microsoft Internet Explorer 3.0 or later. JavaScript capable browsers may allow disabling JavaScript in their preferences. JavaScript is easier to use than are programming languages.
  • 9.  With JavaScript, developers do not need to compile a program or work with a developer's kit. Also, the many JavaScripts available on the Internet can easily be modified and adapted to your own pages.
  • 10. JavaScript programming uses specialized terminology. ◦ Dot Syntax ◦ Objects. ◦ Properties ◦ Methods ◦ Events ◦ Functions ◦ Variables ◦ Expressions ◦ Operators
  • 11.  . Actions by page users trigger event handler commands in the JavaScript. The program will then perform whatever commands are assigned to the event
  • 12.  . Common event handlers are listed in the following table. Event Handler Action onAbort The user stopped loading a page onBlur The user moves from an object onChange The user changed an object onClick The user mouse-clicked an object onError An error occurred in the script
  • 13. Event Handler Action onMouseover The cursor has moved over the object onMouseout The cursor has moved off the object onSelect The user selected the object onSubmit The user submitted a form onUnload The user leaves the window onFocus The user activates an object onLoad The object has been loaded
  • 14.  JavaScript scripts can be embedded in an HTML page or can reside in a separate page.  JavaScript is often placed in the <head> section of the HTML document, but can also be placed in the <body>.  JavaScript object attributes can also be placed in HTML element tags. You can use JavaScript in an HTML document in the following ways:
  • 15.  As statements and functions within <script> and </script> tags.  By specifying a file as the JavaScript source using the <src> attribute of the <script> element.  By specifying a JavaScript expression as the value of an HTML attribute and as event handlers within certain other HTML tags.
  • 16.  The first method places the JavaScript between the <script> and </script> tags. When specifying a script only the tags <script> and </script> are essential.  It is recommendable to specify the script language as an attribute of the script element. Browsers currently assume JavaScript, but other programming languages could become popular in the future.
  • 17.  The standard to open scripting is <script language="JavaScript">.  The script language attribute can also specify the version of JavaScript.  It is also recommendable to specify the MIME type of the script, to denote to the browser that the script is plain text. This is accomplished with the attribute type="text/javascript".
  • 18.  The following example script redirects the browser to a page, named javascript.html. The object is window, the variable property is location, and the value equals the specified HTML file.  <script language="javascript1.2" type="text/javascript"> <!-- Begin hiding script window.location="javascript.html" // End hiding script--> </script>
  • 19.  In the following examples I do not include the <script>and </script> tags,  HTML tags or comment lines. These examples are employed using the methods described above.
  • 20.  The first example is a method for displaying text in a Web page.  The syntax for this method can also be writeIn, a method that attaches a break to each line of text. 
  • 21.  document.write("This is where you place the text that will appear in the Web page.")  The write method also permits use of HTML tags within the parenthesis, as seen below.  document.write("<b>Hello World.</b>")  The writeIn method should be used with preformatted text.
  • 22.  var month = April; var date = fifteenth;  document.write("Remember, your taxes are due on " + month + date);