SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2008
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    External JavaScript sheet example?

    Hello!

    Could someone point me to a link or some mark up for an example of what an external JavaScript sheet is supposed to look like? I know I drop the <script></script> tag, but I'm not sure how the HTML is supposed to be represented in the external file, and none of my books have an example. I know I have to add .js to the external file name. Thanks!

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,035
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)
    There is no external HTML in an external javascript file. Separation is part of the beauty of it.
    Unless you absolutely need to use document.write() or manipulate the DOM, it's best to keep HTML out of it.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •