Thanks...but how to handle this?
<html> <head> <script src="jquery.js"></script> <script> jQuery(document).ready(function() { // Assign event to window.onload jQuery(window).load(function() { alert('Everything is loaded!'); }); }); function test() { alert('test'); } </script> </head> <body onload="test();"> TEST123 </body> </html> I don't want to override the original onload: test() also... why jQuery(body) or jQuery("body") didn't work? thanks. On 6月23日, 下午9時31分, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Hi Howa, > > Try jQuery(window) without the quotes around window. That should do > it! :) > > --Karl > _________________ > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On Jun 23, 2007, at 9:20 AM, howa wrote: > > > > > > > Hello Gilles & Erik, the codes below never work with IE7 & FF2.0 > > > <html> > > <head> > > > <script src="jquery.js"></script> > > > <script> > > jQuery(document).ready(function() { > > alert('ready'); > > > // Assign event to window.onload > > jQuery('window').load(function() { > > alert('Everything is loaded!'); > > }); > > > }); > > > </script> > > > </head> > > <body> > > TEST123 > > </body> > > </html> > > > howa > > > On 6月23日, 下午7時09分, "Gilles (Webunity)" <[EMAIL PROTECTED]> > > wrote: > >> As i see your question, i think you mean this: > > >> jQuery(document).ready(function() { > >> // Assign event to window.onload > >> jQuery('body').load(function() { > >> alert('Everything is loaded!'); > >> }); > > >> }); > > >> On 23 jun, 12:52, howa <[EMAIL PROTECTED]> wrote: > > >>> Hello, > > >>> is it possible to attach some codes to the body.onload via > >>> document.ready, or other methods to attach body.onload? > > >>> thanks.- 隱藏被引用文字 - > > - 顯示被引用文字 -