<!-- 把如下代码加入<body>区域中 -->
<!-- Saved From url=http://www.knowsky.com/js -->
<!-- Web Design bbs url=http://www.knowsky.com/bbs-->
<style type="text/css">
<!--
.topnewstitle {
font-family: 宋体;
font-size: 10pt;
A:hover {color:blue;text-decoration:underline }
}
#topdeck {
display:block;
left: 0px;
top: 0px;
position: absolute;
visibility: hidden;
z-index: 100;
}
.content {
font-size: 10pt;
font-family: 宋体;
color: #000000;
}
//-->
</style>
<script>
var isNS4=(document.layers) ? 1 : 0;
var isIE4=(document.all)? 1 : 0;
var isMoz=((document.getElementById) && !(isIE4)) ? 1 :0;
function ShowNavigateur()
{
alert(isNS4);
alert(isIE4);
alert(isMoz);
}
function activate_mousemove(function_mouse)
{
if(isNS4||isMoz)
document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = function_mouse;
}
function get_mouse(e)
{
var mouse=new Array();
mouse.x=0; mouse.y=0;
if(isNS4||isMoz){
mouse.x=e.pageX; mouse.y=e.pageY;
}else if(isIE4){
mouse.x=event.x+document.body.scrollLeft; mouse.y=event.y+document.body.scrollTop;
}
return mouse;
}
function get_layer(name)
{
if(isNS4){
layer=findLayer(name, document);
//if(layer==null)
//alert('Pb de layer');
return layer;
} else if (isIE4){
//window.status=document.all[name];
return document.all[name];
} else if (isMoz) {
return document.getElementById(name);
}
//alert('Pb de noms');
return null;
}
function findLayer(name, doc) {
var i, layer;
//alert(doc.layers.length);
for (i = 0; i < doc.layers.length; i++) {
layer = doc.layers[i];
//alert(layer.name);
if (layer.name == name)
return layer;
if (layer.document.layers.length > 0)
if ((layer = findLayer(name, layer.document)) != null)
return layer;
}
return null;
}
function hide_layer(layer)
{
if(layer==null){
//window.status="Pas de layer ?cacher";
return;
}
if (isNS4){
layer.visibility = "hide";
}
if (isIE4||isMoz){
layer.style.visibility = "hidden";
}
}
function show_layer(layer) {
if(isNS4){
layer.visibility = "show";
}
if(isIE4||isMoz){
layer.style.visibility = "visible";
}
}
function move_layer_to(layer, x, y)
{
//window.status=layer;
if (isNS4)
{
layer.moveTo(x, y);
}
if (isIE4||isMoz){
//window.status=layer.style;
layer.style.left = x;
layer.style.top = y;
}
}
function setzIndex(layer, z) {
if(isNS4)
layer.zIndex = z;
if(isIE4||isMoz)
layer.style.zIndex = z;
}
function modify_content_layer(layer,content)
{
if(isNS4){
layer.document.write(content);
layer.document.close();
} else if(isIE4||isMoz){
layer.innerHTML=content;
}
}
</script>
<div class="popup" id="topdeck"></div>
<p align="center">
<script language="Javascript">
<!--
var adroite = false;
activate_mousemove(get_mouse2);
function tux(title, text, estadroite)
{
adroite = estadroite;
var content;
if (adroite)
content = "<table border=0 width=300 cellpadding=0 cellspacing=0><tr><td width=100> </td><td width=200><table border=0 cellpadding=0 cellspacing=0 bgcolor=\"#000000\" width=200><tr height=2><td><img src=\"../wydh/images/135/pixel.gif\"></td></tr><tr><td align=center><table border=0 cellpadding=2 cellspacing=0 width=196 bgcolor=white class=\"content\"><tr><td bgcolor=white><center><b>"+title+"</b></center>"+text+"</td></tr></table></td></tr></table></td></tr><tr><td><img src=\"../wydh/images/135/w15.gif\"></td><td valign=top><img src=\"../wydh/images/135/bulle-g.gif\"></td></tr></table>";
else
content = "<table border=0 width=300 cellpadding=0 cellspacing=0><tr><td width=200> <table border=0 cellpadding=0 cellspacing=0 bgcolor=black width=200><tr height=2><td></td></tr><tr><td align=center><table border=0 cellpadding=2 cellspacing=0 width=196 bgcolor=white class=\"content\"><tr><td bgcolor=white><center><b>"+title+"</b></center>"+text+"</td></tr></table></td></tr></table></td><td width=100></td></tr><tr><td valign=top></td><td></td></tr></table>";
l=get_layer("topdeck");
modify_content_layer(l,content)
show_layer(l);
}
function get_mouse2(e)
{
mouse=get_mouse(e);
l=get_layer("topdeck");
var x = mouse.x;
var y = mouse.y;
if(adroite)
x=x+15;
else
x=x-315;
move_layer_to(l,x,y);
}
function kill()
{
l=get_layer("topdeck");
hide_layer(l);
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
// -->
</script>
<a href="#" class="topnewstitle" onmouseout="kill()" onmouseover="javascript:tux('链接title可以做成这样哟', '用onmouseover来冒充一下title,你 可以再美化一下这个界面 ', false)">鼠标移过来看看</a>