jQuery入口函数的四种写法

1.<script type="text/javascript">
        $(document).ready(function () {
            alert("hello");
        })
</script>

2.<script type="text/javascript">
        $(function () {
            alert("hello");
        })
</script>
3.<script type="text/javascript">
    jQuery.ready(function () {
            alert("hello");
        })
</script>
4.<script type="text/javascript">
        jQuery(function () {
            alert("hello");
        })
</script>

  

posted @ 2019-09-03 09:40  不落之波  阅读(1157)  评论(0编辑  收藏  举报