I didn't think of any good solutions for the moment. I now add a browser to register the blur event if I judge that it is not ie. The problem is that when blur is actually the focus of other controls, the method for registering the txtStation control is to fill in a drop-down list next to it, which has never been very interested in jQuery. It is supported by the javascript that you just don't know, I want to try it when I write a function today. When I use bind to register an event, I find that it is not easy.
The Code is as follows:
$ ("# TxtStation"). bind ("onpropertychange", GetStationLevel );
Then I tried onclick and the like, but none of them could be used. I had no choice but to turn over jQuery's APIs. They were all birds and I couldn't understand them, however, we found that all bind registration events do not have on.
I found a change event and tried it.
The Code is as follows:
$ ("# TxtStation"). change (function () {alert ('change ')});
It is found that it will be activated only when the focus is lost, just like onchange. I cannot use it.
With the idea of trying it out, I just deleted the on in front of onpropertychange. Anyway, no matter whether html is writing events that support unsupported content or not, it may be helpful if you write them up. I did not expect it to work. No problem with IE. I don't want to talk about cross-browser. I can also use Firefox.
Firefox uses the oninput event. If I try it, The oninput event is triggered only when the input value is used. This input box is inductive, it is the kind of option that can be used to sense all the characters starting with this word. If the option is selected, oninput will not be stimulated.
I didn't think of any good solutions for the moment. I now add a browser to register the blur event if I judge that it is not ie. The problem is that when blur is actually the focus of other controls, the txtStation control is registered to fill in a drop-down list next to it, so that the blur will be triggered only when the txtStation content is written and the drop-down list is selected. There is a secondary refresh, which has no major impact, however, the user's first click is invalid. Let me know who has a good idea.
Code
The Code is as follows:
If ($. browser. msie)
{
$ ("# <% = TxtStation. TextBoxID %>"). bind ("propertychange", GetStationLevel );
}
Else
{
$ ("# <% = TxtStation. TextBoxID %>"). bind ("blur", GetStationLevel)
}
I didn't seem to have written anything in front of it. The title was very imposing, haha. Write it for fear of forgetting it.