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

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
Spread Privacy
Spread Privacy
I
InfoQ
V
V2EX
S
Schneier on Security
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
C
Cybersecurity and Infrastructure Security Agency CISA
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
Latest news
Latest news
S
Secure Thoughts
Project Zero
Project Zero
MongoDB | Blog
MongoDB | Blog
I
Intezer
Security Latest
Security Latest
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
N
Netflix TechBlog - Medium
V2EX - 技术
V2EX - 技术
量子位
T
Threatpost
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
T
Tor Project blog
A
Arctic Wolf
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
博客园 - Franky
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
L
LINUX DO - 热门话题

博客园 - 大天使泰瑞尔

通过反射机制控制前台的数据项的显示和隐藏 由partition看窗口函数 IE 6下CSS浮动样式的问题 转载一篇拼SQL字符串的语句 ASP.NET 2.0 中控件的简单异步回调 新手基础知识专用 今天终于学会了从客户端调用Web Service 学会了ASP.NET 2.0中的数据批量更新 - 大天使泰瑞尔 - 博客园 数据结构学习(6):队列 数据结构学习(5):链表 数据结构学习(4):栈 数据结构学习(3):堆化优先队列 数据结构学习(2):汉诺塔问题 数据结构学习(1):搜索二叉树 冒泡算法的三种JavaScript表示 XML学习失误系列(2):分清节点性质,使用nodeValue JavaScript&DHTML特效学习(1):MSN提示框 YUI的Drap&Drop对IE7不支持 Gmail邮箱可以直接注册了
YUI学习(1):ToolTip的用法
大天使泰瑞尔 · 2006-11-16 · via 博客园 - 大天使泰瑞尔

     最近在学习YUI,看了一些浪子先生的文章,感觉不错,不过最近估计浪子太忙了,好像一直没怎么更新YUI这部分,笔者也开始学习它,虽然有些吃力,但是先拿软柿子捏吧,就来ToolTip吧。
     构造函数非常简单,第一个是ID,第二个是一个对象,里面有一些配置,重要的是Context(上下文结点的ID)。好啦 全文如下:

 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2<html>
 3    <head>
 4        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 5        <title>Untitled Document</title>
 6        <script type="text/javascript" src="yahoo.js"></script>
 7        <script type="text/javascript" src="event.js"></script>
 8        <script type="text/javascript" src="dom.js"></script>
 9        <script type="text/javascript" src="container.js"></script>
10        <link rel="stylesheet" type="text/css" href="container.css" />
11        <script type="text/javascript">
12               var tooltip1;
13             
14        
</script>
15    </head>
16    <body>
17            <script>tooltip1 = new YAHOO.widget.Tooltip("tt1"{  context:"link" } ); </script>
18            <id="link" href="http://www.yahoo.com" title="I'm a link! I go to another page!" alt="">Hover over me too!</a>
19    </body>
20</html>
21

    可以看出,重要的一点是:

tooltip1 = new YAHOO.widget.Tooltip("tt1", {  context:"link" } ); 

    关于那个配置对象,笔者找了半天也没找到相关文档,希望哪位朋友找到了告诉我一下,谢谢!
    单击此处下载代码