失焦事件和聚焦事件:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script src="https://cdn.bootcss.com/jquery/1.9.0/jquery.js"></script>
</head>
<body>
<input type="text" id="box" class="app" value="11111" />
<span style="display: none">aafsa</span>
<script>
$(‘input‘).focus(function(){
$(‘span‘).show();
});
$(‘input‘).blur(function(){
$(‘span‘).hide();
});
</script>
</body>
</html>
演示:

获得焦点时候会span展示,没有获得焦点时候会隐藏
包括一些change事件,select事件
原文:https://www.cnblogs.com/xiufengchen/p/10350963.html