Chapter 6: JavaScript – Client-Side Scripting

chapter6-230

This chapter introduces the JavaScript (JS) client-side scripting language. Using your knowledge of CSS selectors, JavaScript can programmatically access and alter the HTML hierarchy you define in your markup. With JavaScript we can animate, move, transition, hide, and show parts of the page rather than refresh an entire page from the server. We can also do prevalidation and other logic on the client machine, reducing the number of requests to the server. This power is what makes JavaScript and JavaScript-based frameworks like jQuery crucial participants in modern web development. This chapter will introduce client programming and concepts and JavaScript syntax, including functions and classes, and then describe how JavaScript is best woven into an application together with HTML and CSS.