JavaScript 411 Flashcards
JavaScript is
3 languages all web developers must learn
The 1st languages to study is
HTML to define the content of web pages
The 2nd languages to study is
CSS to specify the layout of web pages
The 3rd languages to study is
JavaScript to program the behavior of web pages
JavaScript and Java are
completely different languages
JavaScript can do what to HTML
Javascript can change:
Content
Attributes
Styles
Elements
JavaScript accepts what type of quotes:
both double and single quotes
HTML Attributes
Can be changed in Javascript
HTML Styles (CSS)
Can be changed in Javascript
HTML Elements
Can hidden in Javascript
How can you hide HTML elements in Javascript?
by changing the display style
How can you hide HTML Styles in Javascript?
variant of changing an HTML attribute
How can you show HTML element in Javascript?
by changing the display style
The Tag
Code must be inserted between and tags
.
Old JavaScript examples may use a type attribute
what is a JavaScript Functions?
a block of JavaScript code
how can the function be executed?
when “called” for
a function can be called
when an event occurs
Where can a Script be placed?
A Scripted can be in the , or in the section of an HTML page, or in both
Is there a good location for a script can be within a HTML?
Placing scripts at the bottom of the element improves the display speed, because script compilation slows down the display.
Is there another place where can Script be placed?
Scripts can also be placed in external files
What is the file extension for javascript?
.js
True or False
An external script can contain tags?
False
External scripts cannot contain tags
What are the advantages for external javascript?
It separates HTML and code
It makes HTML and JavaScript easier to read and maintain
Cached JavaScript files can speed up page loads
External References
External scripts can be referenced with a full URL or with a path relative to the current web page