1.Use <body onload=function> instead of document.ready or window.onload