I have a JavaScript function in my html in script tags. I want to call this function from another JavaScript function that is declared in an external JavaScript file. Assuming function1 is in the script tags, and function2 is calling it from the external file, what is the correct syntax for doing this?
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
closed as not a real question by VisioN, Second Rikudo, bmargulies, C-Pound Guru, Barmar Nov 3 '12 at 3:45It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question. |
|
Assuming function1 is defined before function2 calls it, and function1 takes no parameters:
|
|||||
|
myFunc();
..... – VisioN Nov 2 '12 at 23:42