日期:2014-05-16 浏览次数:20445 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"></script> <script type="text/javascript"> function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } } addLoadEvent(scrollDown); function scrollDown() { alert("aaa"); } $(document).ready( function() { alert('bbb'); }); </script> </head> <body> </body> </html>
------解决方案--------------------
浏览器应该报错了吧,什么错误呢?
函数中用到的pic_box_r2、butong_pic2对象是全局对象吗?没看到获取对象的代码啊。
------解决方案--------------------