首頁  >  文章  >  web前端  >  解析JQuery取得Dom元素的方法

解析JQuery取得Dom元素的方法

巴扎黑
巴扎黑原創
2017-07-24 14:23:201376瀏覽

(function (window) {
   var arr = [];
   var VP = function (selector, context) {
       return new VP.fn.init(selector, context);
}
   VP.fn = VP.prototype = {
     VP.fn = VP.prototype = {
       建構函數:VP,
       init: 函數(選擇器,情境){
  選擇    .charAt( 0);
           if (mark == '#') {
               elem = _document.getElementById(sel). em) {
                   this[0 ] = elem ;
                   this.length = 1;
               }
        },
         splice: arr.splice,
   } ;
   VP .extend = VP.fn.extend = function () {
       var options, name, src, copy, copyIsArray, clone,
target = argument[0] || {},## i = 1,## target = argument[0] || {},## i = 1,## i
# length = argument.length,
deep = false;
       if (typeof target === "boolean") {
          };
             i++;
#            i++;
#        }
       if (typeof target !==中對 {        }
       if (i = == 長度) {
           目標 = this;
           i--;
       }##  我            if ((options = argument[i]) != null) {
               [name];
                   copy = options[name] ;
                   if (目標===複製) {
                                  if (deep && copy && (VP.isPlainObject(複製) ||
             複製))) {
                       if (copyIsArray) {
#                                clone = src && VP.isArray(src) ? src : [];
                       } else {
           src : {};
                       }
                          } else if (copy !== undefined) {
                      目標名稱中[名稱] =複製;
                   }
               }
    之後#    };
   VP.fn.extend({

#get: function () {
           返回此[0];
       },


#    });
  # VP.fn = VP.prototype = VP.prototype = VP.c. VP ;###})(窗);###

以上是解析JQuery取得Dom元素的方法的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn