<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link type="text/css" href="content.css" rel="stylesheet" />
<script src="jquery.js"></script>
<script language="javascript">
//***********默认设置定义.*********************
tPopWait=50;//停留tWait豪秒后显示提示。
tPopShow=5000;//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=99;
//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;
function showPopupText(){
var o=event.srcElement;
MouseX=event.x;
MouseY=event.y;
if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
if(o.dypop!=sPop) {
sPop=o.dypop;
clearTimeout(curShow);
clearTimeout(tFadeOut);
clearTimeout(tFadeIn);
clearTimeout(tFadeWaiting);
if(sPop==null || sPop=="") {
dypopLayer.innerHTML="";
dypopLayer.style.filter="Alpha()";
dypopLayer.filters.Alpha.opacity=0;
}
else {
if(o.dyclass!=null) popStyle=o.dyclass
else popStyle="cPopText";
curShow=setTimeout("showIt()",tPopWait);
}
}
}
function showIt(){
dypopLayer.className=popStyle;
dypopLayer.innerHTML=sPop;
popWidth=dypopLayer.clientWidth;
popHeight=dypopLayer.clientHeight;
/*if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
else popLeftAdjust=0; *///////注释掉的一部分
if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
else popTopAdjust=0;
popLeftAdjust=0;
dypopLayer.style.left=MouseX+document.body.scrollLeft+popLeftAdjust;
dypopLayer.style.top=MouseY+20+document.body.scrollTop+popTopAdjust;
dypopLayer.style.filter="Alpha(Opacity=0)";
fadeOut();
}
function fadeOut(){
if(dypopLayer.filters.Alpha.opacity<popOpacity) {
dypopLayer.filters.Alpha.opacity+=showPopStep;
tFadeOut=setTimeout("fadeOut()",1);
}
else {
dypopLayer.filters.Alpha.opacity=popOpacity;
tFadeWaiting=setTimeout("fadeIn()",tPopShow);
}
}
function fadeIn(){
if(dypopLayer.filters.Alpha.opacity>0) {
dypopLayer.filters.Alpha.opacity-=1;
tFadeIn=setTimeout("fadeIn()",1);
}
}
document.onmouseover=showPopupText;
/*//////////////////////////
编写提示信息函数
*////////////////////////
var ie=document.all||false;
function getDom() ///////////创建xml对象
{
var xmldom=false;
if(ie)
{
try{
xmldom=new ActiveXObject("Msxml2.DomDocument");
}catch(e){xmldom=false;}
}
else if(!ie&&document.implementation&&document.implementation.createDocument)
{
try{
xmldom=document.implementation.createDocument("","",null);
}catch(e){xmldom=false;}
}
return xmldom;
}
function getXml(){ ///////用新创建的xml对象载入xml
var xmldoc=getDom();
if(!xmldoc) return;
xmldoc.async=false;
xmldoc.load("../interface.xml");
return xmldoc;
}
function init(){
var url=window.location.search;
url=url.replace(/\?/g,"");
url=url.split("&");
height=url[0]||("height=200");
width=url[1]||("width=330");
height=height.split("=");
width=width.split("=");
height=parseInt(height[1]);
width=parseInt(width[1]);
window.resizeTo(width,height);
html=getXml().getElementsByTagName("feed")(0).firstChild.nodeValue;
html="<table>"+html+"<\/table>"+"<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'><\/div>";
document.body.innerHTML=html;
}
$(function(){
init();
$("tr").each(function(){
//tips=$(this).find("span>a").text();
$(this).find("span>a").each(function(){
$(this).attr("alt",$(this).text())
})
if(this.innerText.length>22){
it=$(this).find("span.name>a");
if(it.text().length>4){
str=it.text().substr(0,4)+"…";
it.text(str);
}
it=$(this).find("span.article>a");
if(it.text().length>9){
str=it.text().substr(0,9)+"…";
it.text(str);
}
}
});
})
</script>
</head>
<body scroll="no">
</body>
</html>
- 1
- 2
前往页