Jquery官网上两个each用法:
http://api.jquery.com/jQuery.each/
使用时注意点
<!DOCTYPE html> <html> <head> <title>Untitled Page</title> <script type="text/javascript" src="jquery141.js"></script> <script type="text/javascript"> $(document).ready(function () { $(null).each(function(i,n){不会报错 alert(n.id); }); //$.each(null,function(i,n){会报错 // alert(n.id); //}); }); </script> </head> <body> </body> </html>