Home > Web Front-end > JS Tutorial > Introduction to the difference between window.onload and $(function(){})_Basic knowledge

Introduction to the difference between window.onload and $(function(){})_Basic knowledge

WBOY
Release: 2016-05-16 17:18:21
Original
1132 people have browsed it
Copy code The code is as follows:

window.onload=function{}

Indicates that after the page is loaded (including dom and js), the content in the function will be executed;
Copy the code The code is as follows:

$(function(){})

means that after the page (dom) is loaded, the content in the function will be executed.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template