• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 31. A Brief Overview of Dynamic HTML > The Need for Truly Dynamic Pages

The Need for Truly Dynamic Pages

The JavaScript you've seen throughout the first 30 chapters of this book has provided you with a number of useful techniques for adding some semblance of dynamic behavior to your pages:

  • Structures such as the if() and switch() statements enable your code to make decisions based on conditional expressions.

  • Event handlers enable your scripts to trap things like keystrokes and mouse movements and respond to them in real time.

  • You can use alert, confirm, and prompt boxes to interact with the user.

  • Methods such as setTimeout() and setInterval() enable you to construct simple animations.

  • The Image object's src property enables you to change an image on-the-fly.

  • The Location and History objects enable you to control the page displayed in the browser.

  • The Document object's write() and writeln() methods enable your code to write text and tags to a page at startup.

  • You can use cookies to preserve data between pages and even between browser sessions.

  • You can read and write form field values to get and display the results of functions, expressions, or user actions.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint