W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
$.each([52, 97], function(index, value) { alert(index + ': ' + value); }); $.map( [0,1,2], function(index, n){ return n + 4; }); //[4, 5, 6] $.map( [0,1,2], function(n){ return n > 0 ? n + 1 : null; }); //[2, 3] $.map( [0,1,2], function(n){ return [ n, n + 1 ]; }); //[0, 1, 1, 2, 2, 3] var dimensions = { width: 10, height: 15, length: 20 }; $.map( dimensions, function( value, key ) { return value * 2; }); //[20, 30, 40] var dimensions = { width: 10, height: 15, length: 20 }, $.map( dimensions, function( value, key ) { return key; }); //["width", "height", "length"]
var object = $.extend({}, object1, object2); var object = $.extend(true, {}, object1, object2);
$.merge( [0,1,2], [2,3,4] ) //[0,1,2,2,3,4]
$.grep( [0,1,2], function(array,index){ return n > 0; }); //[1,2] $.grep( [0,1,2], function(array,index){ return n > 0; }, true); //[0]
$.inArray( value, array [, fromIndex] )
var xml = "<rss version='2.0'><channel><title>RSS Title</title></channel></rss>", xmlDoc = $.parseXML( xml ), $xml = $( xmlDoc ), $title = $xml.find( "title" );
# If the object is undefined or null, #then "undefined" or "null" is returned accordingly. * jQuery.type(undefined) === "undefined" * jQuery.type() === "undefined" * jQuery.type(window.notDefined) === "undefined" * jQuery.type(null) === "null" # If the object has an internal [[Class]] equivalent to #one of the browser's built-in objects, the associated name is returned. #(More details about this technique.) * jQuery.type(true) === "boolean" * jQuery.type(3) === "number" * jQuery.type("test") === "string" * jQuery.type(function(){}) === "function" * jQuery.type([]) === "array" * jQuery.type(new Date()) === "date" * jQuery.type(/test/) === "regexp"
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: