获取焦点

 

 

 

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="jquery-3.4.1.min.js"></script>		
	</head>
	<body>
		<input type="text"  id="blur" />
		
		
		<script type="text/javascript">
			$(function(){
			 
			//获取焦点 
			$("#blur").focus(function(){				
				console.log("获取焦点!");				
			})
			 
			});
		 
		</script>
	</body>
</html>

  

 

posted @ 2021-12-06 11:35  艾特-天空之海  阅读(29)  评论(0编辑  收藏  举报