|
In many object-oriented programming languages, this (or self) is a keyword which can be used in instance methods to refer to the object on which the currently executing method has been invoked.
復制代碼 代碼如下:
$("#textbox").hover(
function() {
this.title = "Test";
},
fucntion() {
this.title = "OK”;
}
);
這里的this其實是一個Html 元素(textbox),textbox有text屬性,所以這樣寫是完全沒有什么問題的。
但是如果將this換成$(this)就不是那回事了,Error 主站蜘蛛池模板: 松滋市| 渭南市| 水城县| 神池县| 平凉市| 汉阴县| 水城县| 邹平县| 桓仁| 双柏县| 南溪县| 青河县| 益阳市| 武威市| 牡丹江市| 天镇县| 山东省| 柳江县| 红河县| 和田市| 唐山市| 罗源县| 霍邱县| 手机| 环江| 沈丘县| 乐平市| 临沂市| 读书| 镇平县| 策勒县| 遂宁市| 达拉特旗| 巴南区| 仁寿县| 日土县| 建水县| 甘谷县| 五指山市| 司法| 福海县|