Reputation: 1009
What is the difference between these two, in term of functionality?
Upvotes: 1
Views: 1051
Reputation:
Both action is same but jquery .load() required jquery library while javascript .onload is an in buit function doesn't require any framework and also faster then jquery load()
Upvotes: 0
Reputation: 3763
Both are different and has no common load is function or method of jquery and onload is event !
onload Execute a JavaScript when a page is finished loading:
<body onload="myFunction()">
load , Load data from the server and place the returned HTML into the matched element.
$( "#result" ).load( "ajax/test.html" );
Upvotes: 1