jQuery里$(this)和this的区别在哪?
摘要:$(this)是jquery对象,能调用jquery的方法,例如click(), keyup()。而this,则是html元素对象,能调用元素属性,例如this.id,this.value。例如假设已经使得this和$(this)都指向了input对象了,若要获得input的值,可以this.val
阅读全文
posted @ 2016-03-16 13:52
posted @ 2016-03-16 13:52
posted @ 2015-09-21 15:42