Exercises
In the previous chapters, the solutions to the exercises could pretty much be found in the text of the chapter. This time, some of the exercises might require you to do some more reading (or experimentation) outside this book.
- BOM
As a BOM exercise, try coding something wrong, obtrusive, user-unfriendly, and, all in all, very Web 1.0: the shaking browser window. Try implementing code that moves the window around as if there's an earthquake. All you'll need is one of the
move*()functions, one or more calls tosetInterval()and maybe one tosetTimeout()to stop the whole thing. Or how about opening a 200x200 popup and then resizing it slowly and gradually to 400x400? Or here's an easier one: print the current date/time in the status bar ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access