标签:color io java cti sp on ad c javascript
<script type="text/javascript">
$(document).ready(function(){
$("input").focus(function(){
$("input").css("background-color","#FFFFCC");
});
$("input").blur(function(){
$("input").css("background-color","#D6D6FF");
});
});
</script>
</head>
<body>
Enter your name: <input type="text" />
<p>请在上面的输入域中点击,使其获得焦点,然后在输入域外面点击,使其失去焦点。</p>
</body>
jQuery 事件方法获取焦点focus()和失去焦点blur()的用法
标签:color io java cti sp on ad c javascript
原文地址:http://www.cnblogs.com/lschenblog/p/3946468.html