复制代码 代码如下:
jQuery.prototype.test=function(){
this.css("color","#99");//这里的this是jquery对象,而不是dom对象
alert(this[0]);//这里的this[0]指的是dom节点对象
}
复制代码 代码如下:
$("body").click(function(){
$(this).test();
$(this).test().html(this.nodeName).hide(10000);
})
新闻热点
疑难解答
图片精选