扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
jQuery对象本质上是一种类数组对象
var $$ = function (nodeList) {
return new $$.fn.init(nodeList);
};
$$.fn= $$.prototype = {
toString:function () {
return this.slice();
},
constructor: $$,
init:function ( arr ) { // 创建类数组对象 for (var i = 0, l = arr.length; i
使用示例:var para = $$( document.getElementsByTagName('p') );
para.each(function(){
this.className += " " + 'goodbye';
});
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流