asp.net 的游动特效,

来源:百度知道 编辑:UC知道 时间:2024/05/27 03:17:57
我想做一个效果,我们这里有一个公司列表,我想把鼠标移到公司的名称上时,就显示对应的公司信息,
如电话,地址等.
谢谢!

使用JAVASCRIPT实现。
<html>
<head>

<title>tip</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

</head>

<body>
<script>

if(!document.attachEvent)
{
document.attachEvent = function(){document.addEventListener(arguments[0].substr(2),arguments[1],arguments[2])}
}

document.attachEvent("onmouseover",function(e)
{
var tip = "";

if(typeof(event)=="undefined"){
tip = e.target.getAttribute("tips")
}else{
e = event;
tip = e.srcElement.tips;
}

if(typeof(tip)!="undefined"&&tip.length>0)
{
var _tips = document.getElementById("myTip");

if(typeof(_tips)=="undefined"||_tips == null)
{