CHAPTER 32
image
Incorporating JavaScript
Even if you are not a programmer, or not familiar with JavaScript, you can still make use of this powerful language using the classes in this chapter. With them, you can embed simple calculations or complex expressions within an object, just by placing them within a pair of special tokens.
You can also use these recipes to leverage the power of JavaScript for creating sections of conditional HTML, whether based on expressions of your choice, or using a special global keyword to identify the browser in use (such as Firefox, Internet Explorer, and so on).
Once you use these classes, you may find them so handy ...

Get Web Developer's Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.