码迷,mamicode.com
首页 > Web开发 > 详细

Jquery鼠标放上去显示全名的实现方法

时间:2017-08-24 16:16:09      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:鼠标   .net   jquer   func   text   xxxx   fun   mouse   on()   

第一种方式

使用mouseover、mouseout事件   
// 鼠标滑过显示全名
var origin_name;
$(‘.task_name‘).mouseover(function() {
  origin_name = $(this).text();
  $(this).text($(this).nextAll("input").val());
}).mouseout(function() {
  $(this).text(origin_name);
});

第二种方式

使用a标签的title属性

<a title="xxxx">缩写名</a>

鼠标发上去就会显示title的属性值

转载自http://www.jb51.net/article/104721.htm

Jquery鼠标放上去显示全名的实现方法

标签:鼠标   .net   jquer   func   text   xxxx   fun   mouse   on()   

原文地址:http://www.cnblogs.com/hehang/p/7423423.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!