<script> $(document).ready(function() { if (!Array.prototype.forEach) { Array.prototype.forEach = function(fun /*, thisp*/){ var len = this.length; if (typeof fun != "function") throw new TypeError(); var thisp = arguments[1]; for (var i =…
jquery加载页面的方法(页面加载完成就执行),建议大家看下windows.onload与$(document).ready之间的区别. 1.$(function(){ $("#a").click(function(){ //adding your code here }); }); 2.$(document).ready(function(){ $("#a").click(function(){ //adding your code here })…