how to call call method from one js file to another?

Posted by Gow.Net under JavaScript on 7/12/2013 | Points: 10 | Views : 1610 | Status : [Member] | Replies : 1
HI

I have two js file (a.js,b.js)

 a.js

function abcMethod(a,b,c){
//some cod
}


how can i call that method(abcMethod) from a.js to b.js

gowthaman8870226416


Responses

Posted by: Shraddhapatel on: 3/20/2019 [Member] Starter | Points: 25

Up
0
Down
You can try this code:

a.js :
function abcMethod(a,b,c)
{
alert();
}

b.js :
abcMethod(a,b,c);

index.html file :
<script type="text/javascript" src="a.js"></script>
<script type="text/javascript" src="b.js"></script>

ASP.NET Software companies
www.ifourtechnolab.com

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response