焦点
focus() 获取焦点
blur() 失去焦点
<script src="http://how2j.cn/study/jquery.min.js"></script> <script> $(function(){ $("input").focus(function(){ $(this).val("获取了焦点"); }); $("input").blur(function(){ $(this).val("失去了焦点"); }); }); </script> <style> </style> <input type="text" > <input type="text" >