我正在尝试在asp.net(vb.net)中显示鼠标悬停工具提示。然而,它正在使用chrome,IE,但不适用于Firefox。
以下是我的代码:
function getData(arg){
var process=arg.id;
var value;
document.mouseover=function(event){
event=event||window.event;
event=event.clientX;
var mouseX;
var mouseX;
var str;
var showTip=true;
if(process.indexOf('imgProcessOne')>1){
Value = arg.parentElement.nextSibling.textContent;
if(value=="N"){ showTip=false;}
}
if(process.indexOf('imgProcessTwo')>1){
Value = arg.parentElement.nextSibling.nextSibling.textContent;
if(value=="N"){ showTip=false;}
}
if(process.indexOf('imgProcessThree')>1){
Value = arg.parentElement.nextSibling.nextSibling.nextSibling.textContent;
if(value=="N"){ showTip=false;}
}
if(process.indexOf('imgProcessFour')>1){
Value = arg.parentElement.nextSibling.nextSibling.nextSibling.nextSibling.textContent;
if(value=="N"){ showTip=false;}
}
if(showTip==true)
str="<table class='className' style='background- image:url(../../../images/tooltip1.png)'><tr><td>"+value+"</td></tr></table>";
$('.toolTip .content').html(str).css('background','transparent');
$('toolTip').css('left', event.clientX - 40).css('top', event.clientY - 70);
$('.toolTip').css('display','block');
}
else{ return false; }