对this对象的理解

代表当前对象啊,js不是有document.getElementByID通过ID获取对象么,this就是获取当前对象,比如id为btn的按钮的onclick方法 onclick="method(this)",这个this就是当前按钮对象,作用和document.getElementByID("btn")一样。

posted @ 2015-10-27 15:42  Yaolina  Views(222)  Comments(0Edit  收藏  举报