Académique Documents
Professionnel Documents
Culture Documents
Week 11
pkanaksabee@umail.utm.ac.mu
LEARNING OUTCOMES
In this chapter, you will learn how to
PROPERTY
A property is a characteristic or attribute of an
object.
METHOD
A method is an action
Writing text to a web page document
Submitting a form
Searching for a substring
functions)
of
the
DEVELOPER TOOL
Features of a developer tool:
Inspect and edit HTML
Tweak CSS to perfection
Visualize CSS metrics
Debug JavaScript
Quickly find errors
Explore the DOM
10
11
browser.
A node in the DOM tree can be expanded and collapsed
12
Elements tab, the nodes details are displayed in the right side.
In the next slide, this can be seen by selecting the <p> element
13
14
NODE METHODS
CREATE ELEMENT
SWITCHTO
CREATETEXTNODE
APPENDCHILD
INSERTBEFORE
SETATTRIBUTE
ATTR
GETATTRIBUTE
FIRSTCHILD
ETC
15
16
array
17
(getElementsByTagName)
Go through each row, and assign an "evenRow" or
"oddRow" class attribute
(for loop and setAttribute DOM method)
18
JAVASCRIPT CONSOLE
console.log() allows you output messages to a console.
19
20
WHAT IS JQUERY?
jQuery is a fast, small, and feature-rich JavaScript library. It makes things
21
applies a class.
Note that the jQuery selectors are like CSS
selectors
22
23
24
<a href="#"
onclick="hidedesc()">Hide</a>
<a href="#"
onclick="showdesc()">Show</a>
25
26
27