日期:2014-05-16  浏览次数:20340 次

jQuery调用js函数
function luger_resize() {
      。。。。。
    }
$(window).resize(luger_resize());


这样的话不能调用 为什么?
------解决方案--------------------
这样就可以了……
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js" type="text/javascript"></script>
    <script type="text/javascript">
        function luger_resize() {
            alert("卧槽,窗体大小变了呀!");
        }
        $(window).resize(
            function(){
                luger_resize();
            }
        );    
    </script>
</head>
<body>
    <div id="divM" style="width:100%;height:900px;" >
    </div>
</body>
</html>