具体我不知道该怎么写?
知道js里面有onmouseover和onmouseout事件,
jquery里面有mouseover和mouseout事件,但我都不知道怎么用,怎样才能实现我要的效果.
请朋友们多指教! 谢谢!
知道js里面有onmouseover和onmouseout事件,
jquery里面有mouseover和mouseout事件,但我都不知道怎么用,怎样才能实现我要的效果.
请朋友们多指教! 谢谢!
{
document.getElementById('b1').title ="aaaaaaa"
}
<input type="text" id="b1" title="" onmouseover="mouseOver()">
var y = 20;
$("tr.tooltip").mouseover(function(e){
this.myTitle = this.title;
this.title = "";
var tooltip = "<div id='tooltip'>"+ this.myTitle+"<\/div>";
$("body").append(tooltip);
$("#tooltip")
.css({
"top": (e.pageY + y) + "px",
"left": (e.pageX + x) + "px"
}).show("fast");
}).mouseout(function(){
this.title = this.myTitle;
$("#tooltip").remove();
});用jquery