this points to a problem (change point)

This is not a question of object-oriented, but encountered when a js object-oriented example when it suddenly encountered today, call () method, then suddenly found himself even forgot, after finishing as follows checked:
xxx.call (( object name), the parameter a, parameter B)
XXX refers to the need to change the name of the object pointed to this.
apply and it is substantially the same, but the transmission format parameters:
xxx.call ((object name), [parameters a, parameter B])
XXX refers to the need to change the name of the object pointed to this.
There is a third bind () method, bind method returns a this function and parameter binding good, and does not call the original function. So we need a new variable var to accept this new function. (Parameter)

Guess you like

Origin www.cnblogs.com/zhushuaiqi/p/11943537.html