0% found this document useful (0 votes)
37 views

Web Engineering Web Engineering

The document covers JavaScript objects and events. It discusses common JavaScript events like click, load, and submit. It also explains that JavaScript is an object-oriented language and introduces some built-in objects like String, Date, Array, Math, and Navigator. Each object has properties or methods that allow you to manipulate text, dates, arrays, perform math operations, and check browser details.

Uploaded by

dolby3d
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Web Engineering Web Engineering

The document covers JavaScript objects and events. It discusses common JavaScript events like click, load, and submit. It also explains that JavaScript is an object-oriented language and introduces some built-in objects like String, Date, Array, Math, and Navigator. Each object has properties or methods that allow you to manipulate text, dates, arrays, perform math operations, and check browser details.

Uploaded by

dolby3d
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Web Engineering

Hassan Khan
JavaScript Events

 Events are actions that can be detected by


JavaScript.
 Examples of events:
A mouse click
A web page or an image loading
Mousing over a hot spot on the web page
Selecting an input field in an HTML form
Submitting an HTML form
A keystroke

8/9/2010 Hassan Khan 33


Events

 onLoad and onUnload


 onFocus, onBlur and onChange
 onSubmit
 onMouseOver and onMouseOut

8/9/2010 Hassan Khan 34


JavaScript Objects

 JavaScript is an Object Oriented


Programming (OOP) language.
 An OOP language allows you to define your
own objects and make your own variable
types.
 We will start by looking at the built-in
JavaScript objects.

8/9/2010 Hassan Khan 35


JavaScript Objects and Properties

 Properties are the values associated with an


object.

8/9/2010 Hassan Khan 36


JavaScript String Object

 The String object is used to manipulate a


stored piece of text.
 Some String Methods

search()
toLowerCase()
toUpperCase()

8/9/2010 Hassan Khan 37


JavaScript Date Object

 The Date object is used to work with dates


and times.

8/9/2010 Hassan Khan 38


Data Comparison

8/9/2010 Hassan Khan 39


JavaScript Array Object
 The Array object is used to store multiple
values in a single variable.
 An array can be defined in three ways.

8/9/2010 Hassan Khan 40


JavaScript Math Object
 The Math object allows you to perform
mathematical tasks.

Math.PI
Math.E

Math.sqrt(number)
Math.round(4.7)

8/9/2010 Hassan Khan 41


JavaScript Navigator Object

 The Navigator object allows you to


check/validate your Browser.

 Navigator.appName,;
 Navigator.appVersion

8/9/2010 Hassan Khan 42

You might also like