应该等同于<script type="text/javascript">
    function Method1($){
        //一些代码
    };
    !Method1(window.jQuery);
</script>

解决方案 »

  1.   

    匿名函数
    (function($){
    alert($)
    })(this);
    !function($){
    alert($)
    }(this);
    ~function($){
    alert($)
    }(this);皆可
      

  2.   

    谢谢,做个记录
    http://www.jcodecraeer.com/a/jquery_js_ajaxjishu/2012/0628/290.html
    http://stackoverflow.com/questions/10896749/what-does-function-function-window-jquery-do?rq=1
      

  3.   

    (function($){
        alert($)
    })(this);

    !function($){
        alert($)
    }(this);
    是不是一模一样的,有区别吗?
      

  4.   

    就是返回值取反,等价(function(){})()匿名函数直接执行了,只是用取反的标志可以活力匿名函数左右的括号!!