谢!
---------------------------------------------------------------
用层模拟,刚刚写的,自己再强化
1<body>
2<script>
3function show(o){
4tip.style.posLeft=event.clientX+document.body.scrollLeft+10
5tip.style.posTop=event.clientY+document.body.scrollTop+10;
6tip.style.visibility=''
7tip.innerHTML=o.alt;
8}
9function hid(){
10tip.style.visibility='hidden'
11}
12</script>
13<div id="tip" style="visibility:hidden;position:absolute;width:80px;height:20;border:1 solid #3366cc;background-color:#d2e8ff">
14</div>
15<a alt="http://fason.nease.net" href="fason.net" onmousemove="show(this)" onmouseout="hid()">fason fason..</a>
16</body>
---------------------------------------------------------------
除非改系统属性,不过那样所有的title都变大了。
---------------------------------------------------------------
用这个最好的
popup
var myPopup=window.createPopup();
function myShowHelp(myString,color1,color2,color3){
var popupBody=myPopup.document.body;
popupBody.style.backgroundColor=eval(""#"+color1+""");
popupBody.style.border="solid " +eval(""#"+color2+""")+ " 1px";
popupBody.innerHTML="
1<center><font \"#"+color3+"\"")+"="" color="+eval(">"+myString+"</font></center>
";
var hx=event.offsetX;
var vy=event.offsetY;
var kuan=100;
var gao=eval(468*myString.length/kuan);
gao=Math.ceil(gao);
if(gao<14){gao=14;}
if(gao%14!=0)gao=gao-gao%14+14;
myPopup.show(hx-20,vy+16,kuan,gao,document.body);
}
function myCloseHelp(){
myPopup.hide();
}
再需要的时候,调用上面的函数,
---------------------------------------------------------------
1<html>
2<head>
3<script language="JavaScript">
4//***********默认设置定义.*********************
5tPopWait=50;//停留tWait豪秒后显示提示。
6tPopShow=5000;//显示tShow豪秒后关闭提示
7showPopStep=20;
8popOpacity=99;
9
10//***************内部变量定义*****************
11sPop=null;
12curShow=null;
13tFadeOut=null;
14tFadeIn=null;
15tFadeWaiting=null;
16
17document.write("<style type='text/css'id='defaultPopStyle'>");
18document.write(".cPopText { background-color: #F8F8F5;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
19document.write("</style>");
20document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");
21
22
23function showPopupText(){
24var o=event.srcElement;
25MouseX=event.x;
26MouseY=event.y;
27if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
28if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
29if(o.dypop!=sPop) {
30sPop=o.dypop;
31clearTimeout(curShow);
32clearTimeout(tFadeOut);
33clearTimeout(tFadeIn);
34clearTimeout(tFadeWaiting);
35if(sPop==null ¦ ¦ sPop=="") {
36dypopLayer.innerHTML="";
37dypopLayer.style.filter="Alpha()";
38dypopLayer.filters.Alpha.opacity=0;
39}
40else {
41if(o.dyclass!=null) popStyle=o.dyclass
42else popStyle="cPopText";
43curShow=setTimeout("showIt()",tPopWait);
44}
45
46}
47}
48
49function showIt(){
50dypopLayer.className=popStyle;
51dypopLayer.innerHTML=sPop;
52popWidth=dypopLayer.clientWidth;
53popHeight=dypopLayer.clientHeight;
54if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
55else popLeftAdjust=0;
56if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
57else popTopAdjust=0;
58dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
59dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
60dypopLayer.style.filter="Alpha(Opacity=0)";
61fadeOut();
62}
63
64function fadeOut(){
65if(dypopLayer.filters.Alpha.opacity<popOpacity) {
66dypopLayer.filters.Alpha.opacity+=showPopStep;
67tFadeOut=setTimeout("fadeOut()",1);
68}
69else {
70dypopLayer.filters.Alpha.opacity=popOpacity;
71tFadeWaiting=setTimeout("fadeIn()",tPopShow);
72}
73}
74
75function fadeIn(){
76if(dypopLayer.filters.Alpha.opacity>0) {
77dypopLayer.filters.Alpha.opacity-=1;
78tFadeIn=setTimeout("fadeIn()",1);
79}
80}
81document.onmouseover=showPopupText;
82</script>
83</head>
84<body>
85<a href="dispbbs.asp" title="我想请问斑竹?<br>作者:农民<br>发表于2002-6-3 20:17:16<br>最后跟贴:呵呵,是住我们......">我想请问斑竹?</a>
86
87接着前面的
88</body>
89</html>