zoukankan      html  css  js  c++  java
  • [转载]网页脚本_title样式

     

    < span title="Javascript" title="">默认效果


    < span title="< marquee style='100px;'>不羁者的博客< /marquee>" altbg="red" altcolor="yellow" altborder="yellow">滚动字幕


    < span title="< img src='图片地址' border='0'>" altbg="#F7F7F7" altcolor="#999999" altborder="#CCCCCC">图片


    < span title="< i style="FONT-SIZE: 24pt; FONT-FAMILY: verdana">不羁者的博客" altbg="green" altcolor="yellow" altborder="darkgreen">大字体


    < div style="display:none;border:1px solid #000000;background-color:#FFFFCC;font-size:12px;position:absolute;padding:2;" id=altlayer>


    < SCRIPT LANGUAGE="JavaScript">
    < !--
    document.body.onmousemove=quickalt;
    document.body.onmouseover=getalt;
    document.body.onmouseout=restorealt;
    var tempalt='';

    function getalt(){
     if(event.srcElement.title && (event.srcElement.title!='' || (event.srcElement.title=='' && tempalt!=''))){
      altlayer.style.left=event.x;
      altlayer.style.top=event.y+20;
      altlayer.style.display='';
      tempalt=event.srcElement.title;
      tempbg=event.srcElement.altbg;
      tempcolor=event.srcElement.altcolor;
      tempborder=event.srcElement.altborder;
      event.srcElement.title='';
      altlayer.innerHTML=tempalt;
      if (typeof(tempbg)!="undefined"){altlayer.style.background=tempbg}else{altlayer.style.background="infobackground"}
      if (typeof(tempcolor)!="undefined"){altlayer.style.color=tempcolor}else{altlayer.style.color=tempcolor="infotext"}
      if (typeof(tempborder)!="undefined"){altlayer.style.border='1px solid '+tempborder;}else{altlayer.style.border='1px solid #000000';}
     }
    }
    function quickalt(){
     if(altlayer.style.display==''){
      altlayer.style.left=event.x;
      altlayer.style.top=event.y+10;
     }
    }
    function restorealt(){
     event.srcElement.title=tempalt;
     tempalt='';
     altlayer.style.display='none';
    }
    //-->
    < /SCRIPT>


    来源:http://zd1512.blogbus.com/logs/2005/07/1316365.html

  • 相关阅读:
    “做”的“累”
    举国默哀三天
    AjaxRequest
    客户端表单验证js
    书籍下载链接
    Html元素动态添加方法
    java文件读写操作
    查看oracle当前session
    转一篇有关Java的内存泄露的文章(受益哦)
    《高效能人士的七个习惯》摘录
  • 原文地址:https://www.cnblogs.com/bgming/p/273509.html
Copyright © 2011-2022 走看看