Home >Backend Development >PHP Problem >What to do if php loses focus

What to do if php loses focus

藏色散人
藏色散人Original
2020-07-31 09:21:191758browse

Solution to PHP losing focus: 1. Use the "onblur = "functionName()";" method; 2. Define a method "function functionName(){}" and go to the relevant PHP page to call the relevant method That’s it.

What to do if php loses focus

Recommended: "PHP Video Tutorial"

php How to execute a php function when the focus is lost?

1. Binding event: onblur = "functionName()"; //Here is the method of binding the out-of-focus event. Write functionName() in JS

2. Definition method:

<script>
function functionName(){
$.post("url....",{  //这里去相关PHP页面调用相关方法
data:data,
other:other},function(){
});
}
</script>

The above is the detailed content of What to do if php loses focus. For more information, please follow other related articles on the PHP Chinese website!

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