惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
博客园 - 司徒正美
美团技术团队
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Troy Hunt's Blog
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
B
Blog
NISL@THU
NISL@THU
月光博客
月光博客
博客园 - 【当耐特】
AWS News Blog
AWS News Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
腾讯CDC
L
Lohrmann on Cybersecurity
The Cloudflare Blog
L
LINUX DO - 最新话题
S
Security @ Cisco Blogs
S
Secure Thoughts
Spread Privacy
Spread Privacy
有赞技术团队
有赞技术团队
The Last Watchdog
The Last Watchdog
Project Zero
Project Zero
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Vercel News
Vercel News
H
Hacker News: Front Page
S
SegmentFault 最新的问题
Schneier on Security
Schneier on Security
aimingoo的专栏
aimingoo的专栏
P
Privacy & Cybersecurity Law Blog
博客园 - 三生石上(FineUI控件)
Forbes - Security
Forbes - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
I
InfoQ
T
Tailwind CSS Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
GRAHAM CLULEY
W
WeLiveSecurity
小众软件
小众软件
Recorded Future
Recorded Future
Cyberwarzone
Cyberwarzone
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org

博客园 - 柴火

SqlServer死锁处理存储过程 DB2常用SQL的写法(未整理) 常用快递公司列表 看看google员工的“堕落”工作环境 Eclipse的快捷键大全(不断更新中) [转]不花钱不求人 硬盘数据恢复六大招 [转]大学生不如狗 [转]dos常用命令 [转]net命令详解 [转]FTP命令大全 [转]如何在Web页面上直接打开、编辑、创建Office文档 网页或VB中操作word的方法 Script直接写文件内容到word Asp.net中的两种刷新父窗体方法 [转]一个民工的月账本(看了让人流泪) 数据库连接串大全 【Asp.Net】在DataGrid里添加行脚本代码的方法 【Asp.Net】DataGrid里实现多选提交的方法 简单的SQL分页法
鼠标指向提示javascript程序
柴火 · 2006-09-18 · via 博客园 - 柴火

  1//定义变量、设置默认值
  2var LabelFontFace="宋体,arial,Verdana";
  3var LabelFontColor="#000000";
  4var LabelFontSize="9pt";
  5var LabelFontStyle="Font.PLAIN";
  6var LabelBorderColor="#000000";
  7var LabelBackColor="#FFFFE1";
  8//设置各个属性
  9function SetLabelFontFace(obj)
 10{
 11       obj=Trim(obj);
 12       if(obj==null || obj==""[img]/images/wink.gif[/img]
 13       {
 14              obj="宋体,arial,Verdana";
 15       }

 16       LabelFontFace=obj;
 17}

 18function SetLabelFontColor(obj)
 19{
 20    obj=Trim(obj);
 21       if(obj==null || obj==""[img]/images/wink.gif[/img]
 22       {
 23              obj="#000000";
 24       }

 25       LabelFontColor=obj;
 26}

 27function SetLabelFontSize(obj)
 28{
 29    obj=Trim(obj);
 30       if(obj==null || obj==""[img]/images/wink.gif[/img]
 31       {
 32              obj="9pt";
 33       }

 34       LabelFontSize=obj;
 35}

 36function SetLabelFontStyle(obj)
 37{
 38    obj=Trim(obj);
 39       if(obj==null || obj==""[img]/images/wink.gif[/img]
 40       {
 41              obj="Font.PLAIN";
 42       }

 43       LabelFontStyle=obj;
 44}

 45 
 46function SetLabelBorderColor(obj)
 47{
 48    obj=Trim(obj);
 49    if(obj==null || obj==""[img]/images/wink.gif[/img]
 50    {
 51        obj="#000000";
 52    }

 53    LabelBorderColor=obj;
 54}

 55 
 56function SetLabelBackColor(obj)
 57{
 58    obj=Trim(obj);
 59    if(obj==null || obj==""[img]/images/wink.gif[/img]
 60    {
 61        obj="#FFFFE1";
 62    }

 63    LabelBackColor=obj;
 64}

 65 
 66//合成文字样式
 67function SetTextStyle(str)
 68{
 69    var strRet="";
 70    var strStyle="";
 71    strStyle="font-family:"+LabelFontFace+";";
 72    strStyle+="color:"+LabelFontColor+";";
 73    strStyle+="font-size:"+LabelFontSize+";";
 74    switch(LabelFontStyle.toLowerCase())
 75    {
 76        case "font.plain":
 77            strStyle+="font-weight: normal;";
 78            strStyle+="font-style: normal;";
 79            break;
 80        case "font.bold":
 81            strStyle+="font-weight: bold;";
 82            strStyle+="font-style: normal;";
 83            break;
 84        case "font.italic":
 85            strStyle+="font-weight: normal;";
 86            strStyle+="font-style: italic;";
 87            break;
 88        case "font.italicbold":
 89        case "font.bolditalic":
 90            strStyle+="font-weight: bold;";
 91            strStyle+="font-style: italic;";
 92            break;
 93        default:
 94            strStyle+="font-weight: bold;";
 95            strStyle+="font-style: italic;";
 96            break;
 97    }

 98    strRet="<font style='"+strStyle+"'>";
 99    strRet+="&nbsp;"+str+"&nbsp;";
100    strRet+="</font>";
101    return strRet;
102}

103 
104//合成表格样式
105function SetTableStyle()
106{
107    var strRet="";
108    strRet+="border-right: "+LabelBorderColor+" 1px solid;";
109    strRet+="border-top: "+LabelBorderColor+" 1px solid;";
110    strRet+="border-left: "+LabelBorderColor+" 1px solid;";
111    strRet+="border-bottom: "+LabelBorderColor+" 1px solid;";
112    strRet+="background-color:"+LabelBackColor;    
113    return strRet;
114}

115 
116//显示提示
117function ShowNote(str)
118{
119       var strHtml;
120       strHtml="";
121       strHtml+="<table height=1px width=1px border='0'cellspacing='0' cellpadding='0' style='" + SetTableStyle() + "'>";
122       strHtml+="<tr>";
123       strHtml+="<td>"+SetTextStyle(str)+"</td>";
124       strHtml+="</tr>";
125       strHtml+="</table>";                           
126       if (document.all&&document.readyState=="complete"[img]/images/wink.gif[/img]
127       {                                        
128              document.all.div_Note.innerHTML=strHtml;
129              document.all.div_Note.style.pixelLeft=event.clientX+document.body.scrollLeft+10
130              document.all.div_Note.style.pixelTop=event.clientY+document.body.scrollTop+10
131              document.all.div_Note.style.visibility="visible"
132       }
     
133}

134 
135//隐藏提示
136function HideNote()
137{
138       if (document.all)
139       {
140              document.all.div_Note.style.visibility="hidden";
141       }

142       else
143       {
144              if (document.layers)
145              {
146                     clearInterval(currentscroll)
147                     document.div_Note.visibility="hidden";
148              }

149       }
                                 
150}

151 
152//初始化
153function Init()
154{
155    window.document.write("<div id=\"div_Note\" style=\"VISIBILITY:hidden; POSITION:absolute; HEIGHT:13px;z-index:1\"></div>"[img]/images/wink.gif[/img];
156}

157Init();
158 
159//生成提示字符
160function ShowLabel(text,note,bclick)
161{
162       if(bclick!=null)
163       {
164              return "<a href=\"#\" onMouseOver=\"ShowNote('" + note + "')\" onMouseOut=\"HideNote()\" onClick=\"JavaScript[img]/images/biggrin.gif[/img]oSomeThing(this);\">" + text + "</a>";
165       }

166       else
167       {
168           return "<a href=\"#\" onMouseOver=\"ShowNote('" + note + "')\" onMouseOut=\"HideNote()\">" + text + "</a>";
169       }

170}

171

posted @ 2006-09-18 11:56  柴火  阅读(591)  评论(1)    收藏  举报

刷新页面返回顶部