javascript in a separate file?

Discussion in 'HTML' started by John Salerno, Oct 30, 2006.

  1. John Salerno

    John Salerno Guest

    Hi guys. I'm just curious, is it possible to put your javascript in a
    separate file like you do with CSS? If so, is the syntax for including
    it the same as CSS?

    Thanks.
    John Salerno, Oct 30, 2006
    #1
    1. Advertising

  2. John Salerno

    Vince Morgan Guest

    "John Salerno" <> wrote in message
    news:45455ac6$0$8782$...
    > Hi guys. I'm just curious, is it possible to put your javascript in a
    > separate file like you do with CSS? If so, is the syntax for including
    > it the same as CSS?
    >
    > Thanks.


    <script src="../myscript.js"></script>

    HTH
    Vince Morgan
    Vince Morgan, Oct 30, 2006
    #2
    1. Advertising

  3. Vince Morgan wrote:

    > "John Salerno" <> wrote:
    >> Hi guys. I'm just curious, is it possible to put your javascript in a
    >> separate file like you do with CSS? If so, is the syntax for
    >> including it the same as CSS?

    >
    > <script src="../myscript.js"></script>


    <script type="text/javascript" src="../myscript.js"></script>

    --
    -bts
    -Motorcycles defy gravity; cars just suck
    Beauregard T. Shagnasty, Oct 30, 2006
    #3
  4. John Salerno

    John Salerno Guest

    Beauregard T. Shagnasty wrote:
    > Vince Morgan wrote:
    >
    >> "John Salerno" <> wrote:
    >>> Hi guys. I'm just curious, is it possible to put your javascript in a
    >>> separate file like you do with CSS? If so, is the syntax for
    >>> including it the same as CSS?

    >> <script src="../myscript.js"></script>

    >
    > <script type="text/javascript" src="../myscript.js"></script>
    >


    Thanks!
    John Salerno, Oct 30, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page