为了账号安全,请及时绑定邮箱和手机立即绑定

我的这个input框聚焦失焦事件怎么用不起呢?

我的这个input框聚焦失焦事件怎么用不起呢?

未来99 2018-07-28 18:43:29
<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title><script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script><script type="text/javascript" >$(document).ready(function() {search_focus();});function search_focus() {$(".search-input").focus(function() {$(this).css('border-bottom', '1px solid red');}).blur(function() {$(this).css('border-bottom', '1px solid #c6ccc');});}</script><style>.search-area {margin: 5px 20px 0; border-bottom: 1px solid #C6CCCC; text-align: left;}.search-input {width: 270px; height: 40px; outline: none; font-size: 14px; color:#747878; background-color: transparent;}</style></head><body><div class="search-area"><input type="text" class="search-input"></div></body></html>
查看完整描述

1 回答

?
未来99

TA贡献21条经验 获得超9个赞

好了,解决了,原来把$(this).css('border-bottom', '');这个重新值为空,就可以了。

查看完整回答
反对 回复 2018-07-28
  • 1 回答
  • 0 关注
  • 2727 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信