概述 jQuery.isArray( obj )
返回值:Boolean
描述:确定的参数是一个数组。
$.isArray()
返回一,用来指明对象是否是一个JavaScript数组(而不是类似数组的对象,如一个jQuery对象)。
示例
Finds out if the parameter is an array.
- <!DOCTYPE html>
- <html>
- <head>
- <script src="http://code.jquery.com/jquery-latest.js"></script>
- </head>
- <body>
- Is [] an Array? <b></b>
- <script>$("b").append( "" + $.isArray([]) );</script>
-
- </body>
- </html>