CSDN博客

img slightboy

HTC 提示效果 TIPS

发表于2004/10/25 17:47:00  909人阅读

<ATTACH EVENT="ondocumentready" HANDLER="Initialise"/>
<SCRIPT LANGUAGE="JScript">
/*
  Program Name: SLIGHTBOY HTC Event Tips.
  Program Author: SLIGHTBOY.
  Write Date: 2004-10-25.
*/

var Wish_Content_Tips = window.document.getElementById("Wish_Content_Tips");
if (Wish_Content_Tips == null)
{
  var Wish_Content_Tips = window.document.createElement("div");
  with(Wish_Content_Tips)id="Wish_Content_Tips";
  window.document.body.appendChild(Wish_Content_Tips);
}

function Initialise() {
  onmouseover = onmouseover_event;
  onmousemove = onmousemove_event;
  onmouseout = onmouseout_event;
}

function onmouseover_event() {
  var content ="<table width=/"130/" border=/"0/" cellpadding=/"2/" cellspacing=/"2/" style=/"background-color:#808080;word-break:break-all;filter: Alpha(Opacity=90, FinishOpacity=30, Style=1, StartX=1, StartY=1, FinishX=100, FinishY=100);/"><tr><td><font color=/"#FFFFFF/">"+ this.tips +"</font></td></tr></table>";
  Wish_Content_Tips.innerHTML = content;
  Wish_Content_Tips.style.visibility = "visible";
  Wish_Content_Tips.style.position = "absolute";
}

function onmousemove_event() {
  Wish_Content_Tips.style.left = event.clientX - 60;
  Wish_Content_Tips.style.top = event.clientY + 25;
}

function onmouseout_event() {
  Wish_Content_Tips.style.visibility = "hidden";
}
</SCRIPT>


使用方法:
<style type="text/css">
.test {
behavior:url(behaviorEvent.htc);
}
</style>
<div align="center">
<a href="" title="" tips="sdfsdadfwefe<br>dfasd" class="test">fasdfasd</a>
<br><br>
<a href="" title="" tips="sdfsdadfwefe<br>dfasd" class="test">fasdfasd</a>
</div>

阅读全文
0 0

相关文章推荐

img
取 消
img