HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 14. JAVASCRIPT AND AJAX 151


When we do this, we call the resultcamel caseto emphasize that the profile
of the word looks like the back of a camel.


Exam Question 265(p.352): Convert border-top-right-radius to camel
case.
Required Answer:borderTopRightRadius


14.4.3 Where Should JavaScript Go?


On your webpage, where should you put the JavaScript?


Normally theis one way.

14.4.4 On... Triggers


JavaScript programs are usually triggered by external events. Specifically,
they are most often triggered by the actions of the user, such as moving or
clicking the mouse or pressing a key on the keyboard. They can also be
triggered by events that happen as a page is loaded.


http://www.w3schools.com/tags/ref_eventattributes.asphas a list of
event attributes. These are the triggers. They go within other markup.
They all start with the word β€œon”.


onclickandclickmark code that is triggered when the user clicks on some-
thing.


Exam Question 266(p.352): What HTML attribute= is used to run a
JavaScript action when the user single-clicks on the specified item?
Required Answer:onclick=


Exam Question 267(p.352): What HTML attribute= is used to run a
JavaScript action when the user double-clicks on the specified item?
Required Answer:ondblclick=

Free download pdf