Home  >  Article  >  Web Front-end  >  JQuery text changes trigger events such as focus events and out-of-focus events_jquery

JQuery text changes trigger events such as focus events and out-of-focus events_jquery

WBOY
WBOYOriginal
2016-05-16 17:03:431349browse

Focus event in Juery:

Copy code The code is as follows:

$("#id") .focus(function(){
});

Out of focus event:
Copy code The code is as follows:

$("#id").blur(function(){
});

But the text change event cannot be like this Write:
Copy code The code is as follows:

$("#id").change( function(){
});

The text change event can be written like this, propertychange is an event triggered when the property changes
Copy code The code is as follows:

$("#id").bind("propertychange",function() {
});
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn