+ 1
is there any main method or function in JavaScript from which execution starts..??
3 ответов
+ 3
No
you can execute any piece of code straight away
put the js files in the end of the <body> tag so that html and css are completely loaded before js
0
like said above the code will be ran whenever the script tag is loaded. however you often see the Jquery 'documentready' used as a sort of entry point. but for different reasons.