Ajax functions cannot be called with this, while ajax functions can be called with this
Some time ago, I saw a similar saying in my blog, but I didn't care about it at the time. Today I met it. Mark it, in the ajax return method, this call does not work, that is, $ (this) cannot obtain any value. The correct method is $ ('# div') to obtain the elements you want to operate.
I cannot identify $ (this) in Jquery ajax ?? The Code is as follows:
It cannot be used. Get the variable var mythis = $ (this) out of ajax and use it in it.
Ajax asynchronous call, callback function problems, this Is Not Defined
In updateEvent (), this indicates the method itself. this. myState indicates the myState parameter in updateEvent (), but you have not defined it in this method.
In <input type = "text" onclick = "a (this. value)"/>, this indicates the text box itself, so the value attribute is default and does not need to be written.
This is my opinion ..