jquery添加方法和屬性
jquery.fn=jquery.prototype ={
jquery版本
}
construtor 指向修正
js源碼中
fun aaa(){}
會自動生成一句 aaa.prototype.constructor = aaa ;
容易被修改是以需要修正
aaa.prototype= {
name:"hello",
age:"20",
}
與
aaa.prototype= {
aaa.constructor :aaa;
name:"hello",
age:"20",
}
init()
$("li")選擇是以li
1.首先排除 $(null) $(undefined) 走if 直接 return this (this指對象)
2.判斷字元串
3.判斷Dom元素
4. init作用之一 建立标簽 選擇 id class