Proper use of bind and referencing objects values in a click handler
This question already has an answer here:
bind()
makes the element you bind with be the 'this' inside the method. You should use 'this' as the reference, not the name you used when you bound.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
链接地址: http://www.djcxy.com/p/96992.html上一篇: 带参数的Javascript事件处理程序
下一篇: 在点击处理程序中正确使用绑定和引用对象值