calling a java-script function from a different page?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • wolfv

    #1

    calling a java-script function from a different page?

    How can I call a java-script function from an .html page when the
    function is in a .js page?

    For now the java-script function is placed at the top of the .html
    page, but I want to move the java function to its own separate page.


    Thank you.

  • wolfv

    #2
    Re: calling a java-script function from a different page?

    Save the file in text-only format with a .js extension.

    Include the file in the HEAD section of your Web pages. You can include
    more than one external JavaScript file on the page. Just call each
    separately like this:

    <script src="ExternalJS _1.js"
    language="javas cript"
    type="text/javascript"></script>

    <script src="ExternalJS _2.js"
    language="javas cript"
    type="text/javascript"></script>

    Servers must be configured to serve .js files.

    Comment

    Working...