Hi. I want to call 2 functions on body load.(JS functions).
So calling both on body load is good or call one function on body load and call other one at the end of first function?
i mean;
or
Which approach is good.
Is there any advantage and disadvantage in both of these?
Regards
Dheeraj Joshi
So calling both on body load is good or call one function on body load and call other one at the end of first function?
i mean;
Code:
function my fun()
{
}
function myfun2()
{
}
<body onLoad="myfun();myfun2()">
Code:
fuction myfun()
{
// Do all craps here.
myfun2();
}
function myfun2()
{
// Do all craps here.
}
<body onLoad="myfun()">
Is there any advantage and disadvantage in both of these?
Regards
Dheeraj Joshi
Comment