SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2003
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Linking to javascripts

    I am familiar with using CSS stylesheets, but I understand that it is possible to do the same sort of link with javascripts. Apparently when your site is being considered for search engine submission the amount of lines/words etc between the <head> and <body> tags is important ie less is best. As many scripts 'live' between these tags, a link could be just the solution I'm looking for.

    Can anyone help with the syntax for this type of link please?

  2. #2
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Location
    Grand Rapids, MI
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <script src="myfile.js"></script>
    This will include the code just as if it were embedded in the source of the HTML page. It's also handy for reusing the script on other pages.

    For more info, search for the following terms:
    • Include file
    • External JS
    Andy
    From the English nation to a US location.


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
  •