window.load&之间的区别jQuery中的document.ready吗? [英] Diiference between window.load & document.ready in jQuery ?..

查看:127
本文介绍了window.load&之间的区别jQuery中的document.ready吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

jQuery中$(window).load(function(){和$(document).ready(function(){在jQuery中有什么区别?

以及何时使用哪个?? ...

document.ready用于防止文档完成加载(准备就绪)之前运行任何jQuery代码.window.load()怎么样......

谢谢,
Amit Choudhary

hey everyone,

What is the difference between $(window).load(function() { and $(document).ready(function() { in jQuery ?

And Which to use When??...

document.ready is used to prevent any jQuery code from running before the document is finished loading (is ready).What about window.load() ???...

Thanks,
Amit Choudhary

推荐答案

(window).load(function(){和
(window).load(function() { and


(document).ready(function() {在jQuery中?

以及何时使用哪个?? ...

document.ready用于防止文档完成加载(准备就绪)之前运行任何jQuery代码.window.load()怎么样......

谢谢,
Amit Choudhary
(document).ready(function() { in jQuery ?

And Which to use When??...

document.ready is used to prevent any jQuery code from running before the document is finished loading (is ready).What about window.load() ???...

Thanks,
Amit Choudhary


窗口是文档的父节点.因此,一旦文档准备好,将仅调用窗口Laod.将子对象完全加载到窗口后,将调用该父对象的加载事件.
Window is the parent node of the document. So once the docuemnt is ready then only window laod will be called. Once the child object are fully loaded on the window, after that parent object load event is called.


这篇关于window.load&之间的区别jQuery中的document.ready吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆