Home >php教程 >PHP开发 >A brief discussion on 4 ways to initialize Jquery pages

A brief discussion on 4 ways to initialize Jquery pages

高洛峰
高洛峰Original
2016-12-05 09:51:531137browse

<script src="Scripts/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
 $(document).ready(function () {
  alert("第一种方法。");
 });
 $(function () {
  alert("第二种方法。");
 });
 jQuery(function ($) {
  alert("第三种方法。");
 });
 window.onload = function () {
  alert("第四种方法。");
 }
</script>


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn