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

12.5. JavaScript

Dreamweaver works with JavaScript in a variety of ways. In addition to using JavaScript behaviors, you can link to scripts in external .js files, edit .js files directly, and debug JavaScript code.

12.5.1. Adding Scripts to Documents

When you apply behaviors using the Behaviors panel, Dreamweaver adds the JavaScript to the <script> tag within the <head> tag. (All scripts used throughout a site are listed in the Scripts category of the Assets panel.) If you apply the same behavior twice within the same document, Dreamweaver is smart enough not to duplicate the JavaScript code within the <script> tag. You can even modify the JavaScript functions by hand in Code view, provided you don't change a function's name, Dreamweaver won't overwrite your changes even if you reapply the same behavior.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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