• 漂亮的title提示信息


    1. <HTML> 
    2. <HEAD> 
    3. <title>一种很酷的文字提示效果演示</title> 
    4. <style> 
    5. .tableBorder7{800;solid; background-color: #000000;} 
    6. TD{font-family: 宋体;font-size: 12px;line-height : 15px ;} 
    7. th{background-color: #f7f7f7;color: #000000;font-size: 12px;font-weight:bold;} 
    8. th.th1{background-color: #333333;} 
    9. td.TableBody7{background-color: #B1EA45;} 
    10. </style> 
    11. <script language="JavaScript"> 
    12. //more javascript from http://www.51it.org 
    13. <!-- 
    14. var pltsPop=null
    15. var pltsoffsetX = 10;   // 弹出窗口位于鼠标左侧或者右侧的距离;3-12 合适 
    16. var pltsoffsetY = 15;  // 弹出窗口位于鼠标下方的距离;3-12 合适 
    17. var pltsPopbg="#FFFFEE"; //背景色 
    18. var pltsPopfg="#111111"; //前景色 
    19. var pltsTitle=""
    20. document.write('<div id=pltsTipLayer style="display: none;position: absolute; z-index:10001"></div>'); 
    21.  
    22. function pltsinits() 
    23.     document.onmouseover   = plts
    24.     document.onmousemove = moveToMouseLoc
    25.  
    26. function plts() 
    27. {  var o=event.srcElement; 
    28.     if(o.alt!=null && o.alt!=""){oo.dypop=o.alt;o.alt=""}; 
    29.     if(o.title!=null && o.title!=""){oo.dypop=o.title;o.title=""}; 
    30.     pltsPop=o.dypop; 
    31.     if(pltsPop!=null&&pltsPop!=""&&typeof(pltsPop)!="undefined") 
    32.     { 
    33.        pltsTipLayer.style.left=-1000; 
    34.        pltsTipLayer.style.display=''
    35.        var Msg=pltsPop.replace(/ /g,"<br>"); 
    36.        MsgMsg=Msg.replace(/x13/g,"<br>"); 
    37.        var re=/{(.[^{]*)}/ig; 
    38.        if(!re.test(Msg))pltsTitle="<font color=#ffffff>简介</font>"
    39.        else{ 
    40.          re=/{(.[^{]*)}(.*)/ig; 
    41.            pltsTitle=Msg.replace(re,"$1")+" "; 
    42.          re=/{(.[^{]*)}/ig; 
    43.          MsgMsg=Msg.replace(re,""); 
    44.          MsgMsg=Msg.replace("<br>","");} 
    45.          //var attr=(document.location.toString().toLowerCase().indexOf("list.asp")>0?"nowrap":""); 
    46.               var content = 
    47.              '<table style="FILTER:alpha(opacity=90) shadow(color=#bbbbbb,direction=135);" id=toolTipTalbe border=0><tr><td width="100%"><table class=tableBorder7 cellspacing="1" cellpadding="0" style="100%">'
    48.              '<tr id=pltsPoptop ><th height=18 valign=bottom class=th1 ><b><p id=topleft align=left><font color=#ffffff></font>'+pltsTitle+'</p><p id=topright align=right style="display:none">'+pltsTitle+'<font color=#ffffff></font></b></th></tr>'+ 
    49.              '<tr><td "+attr+" class=tablebody7 style="padding-left:14px;padding-right:14px;padding-top: 6px;padding-bottom:6px;line-height:135%">'+Msg+'</td></tr>'+ 
    50.              '<tr id=pltsPopbot style="display:none"><th height=18 valign=bottom class=th1><b><p id=botleft align=left><font color=#ffffff></font>'+pltsTitle+'</p><p id=botright align=right style="display:none">'+pltsTitle+'<font color=#ffffff></font></b></th></tr>'+ 
    51.              '</table></td></tr></table>'; 
    52.               pltsTipLayer.innerHTML=content
    53.               toolTipTalbe.style.width=Math.min(pltsTipLayer.clientWidth,document.body.clientWidth/2.2); 
    54.               moveToMouseLoc(); 
    55.               return true; 
    56.        } 
    57.     else 
    58.     { 
    59.            pltsTipLayer.innerHTML=''
    60.              pltsTipLayer.style.display='none'
    61.               return true; 
    62.     } 
    63.  
    64.  
    65. function moveToMouseLoc() 
    66.        if(pltsTipLayer.innerHTML=='')return true; 
    67.        var MouseX=event.x; 
    68.        var MouseY=event.y; 
    69.        //window.status=event.y; 
    70.        var popHeight=pltsTipLayer.clientHeight; 
    71.        var popWidth=pltsTipLayer.clientWidth; 
    72.        if(MouseY+pltsoffsetY+popHeight>document.body.clientHeight) 
    73.        { 
    74.                 popTopAdjust=-popHeight-pltsoffsetY*1.5; 
    75.                 pltsPoptop.style.display="none"
    76.                 pltsPopbot.style.display=""
    77.        } 
    78.         else 
    79.        { 
    80.                  popTopAdjust=0
    81.                 pltsPoptop.style.display=""
    82.                 pltsPopbot.style.display="none"
    83.        } 
    84.        if(MouseX+pltsoffsetX+popWidth>document.body.clientWidth) 
    85.        { 
    86.               popLeftAdjust=-popWidth-pltsoffsetX*2; 
    87.               topleft.style.display="none"
    88.               botleft.style.display="none"
    89.               topright.style.display=""
    90.               botright.style.display=""
    91.        } 
    92.        else 
    93.        { 
    94.               popLeftAdjust=0
    95.               topleft.style.display=""
    96.               botleft.style.display=""
    97.               topright.style.display="none"
    98.               botright.style.display="none"
    99.        } 
    100.        pltsTipLayer.style.left=MouseX+pltsoffsetX+document.body.scrollLeft+popLeftAdjust; 
    101.        pltsTipLayer.style.top=MouseY+pltsoffsetY+document.body.scrollTop+popTopAdjust; 
    102.          return true; 
    103. pltsinits(); 
    104. //--> 
    105. </script> 
    106. </HEAD> 
    107.  
    108. <BODY> 
    109. <div title="醉别西楼醒不记,春梦秋云,聚散真容易。<br>斜月半窗还少睡。画屏闲展吴山翠。<br>衣上酒痕诗里字,点点行行,总是凄凉意。<br>红烛自怜无好计,夜寒空替人垂泪。">蝶恋花</div> 
    110. </BODY> 
    111. </HTML> 

  • 相关阅读:
    C#文件下载(实现断点续传)
    C#winform实现跑马灯
    Asp.net GridView转换成DataTable
    SQL Server 索引重建脚本
    SQL SERVER数据库维护与重建索引
    python try except 出现异常时,except 中如何返回异常的信息字符串
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 0: invalid continuation byte
    bower 安装依赖提示 EINVRES Request to https://bower.herokuapp.com/packages/xxx failed with 502
    EINVRES Request to https://bower.herokuapp.com/packages/ failed with 502
    使用notepad++插件远程编辑linux下的配置文件
  • 原文地址:https://www.cnblogs.com/umgsai/p/3908179.html
Copyright © 2020-2023  润新知