concept script control in category jQuery

This is an excerpt from Manning's book jQuery in Action, Third Edition.
When it comes to DOM elements, some of the most basic components you can manipulate are the properties and the attributes assigned to those elements. These properties and attributes are initially assigned to the JavaScript object instances that represent the DOM elements as a result of parsing the HTML markup, and they can be changed dynamically under script control. Let’s make sure that you have the terminology and concepts straight.
Properties are intrinsic to JavaScript objects, and each has a name and a value. The dynamic nature of JavaScript allows you to create properties on JavaScript objects under script control. (The appendix goes into great detail on this concept if you’re new to JavaScript.)
In this example, you employ both styles of event handler declaration: declaring in a markup attribute
and declaring under script control
. In the body of the page, you define an img element, having example as its ID, upon which you’re defining the event handler for the click event using the onclick attribute
.
and declaring under script control
. In the body of the page, you define an img element, having example as its ID, upon which you’re defining the event handler for the click event using the onclick attribute