English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to have some simple functions embedded while lengthy functions in an external js file. Is this possible? If yes how?

2007-05-09 01:18:46 · 4 answers · asked by Vij 1 in Computers & Internet Programming & Design

4 answers

Yes it can be done.

For an embedded script, use:


For an external script, use:


Both go into the head section of the HTML document.

2007-05-09 01:27:16 · answer #1 · answered by Anonymous · 0 0

Yes it can be done as already shown.
The external script is usually inserted into the section of the html but does not have to be.
The inline script can be anywhere that it is needed. This is usually in the section if the script is writing html, but can also be in the section if it contains a function that is called in another place in the document.

2007-05-09 01:32:06 · answer #2 · answered by AnalProgrammer 7 · 0 0

Yes, Its possible, you can keep lengthy functions in file and short functions in html page under