Edit The Code:
See Result »
Try it Yourself - ©
w3big.com
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>本教程(w3big.com)</title> <script src="http://cdn.static.w3big.com/libs/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $("input").blur(function(){ alert("输入框失去了焦点"); }); }); </script> </head> <body> 输入你的名字: <input type="text"> <p>在输入框写些东西,然后点击输入框外,让其失去焦点。</p> </body> </html>