1·Your widget will need to know which HTML element to hook itself into and what content to display in its tooltip, so you'll specify these as arguments to the constructor and save them in the object.
这个部件需要知道它自己要连接到哪个 HTML 元素,以及要在工具提示中显示什么内容,所以要作为构造方法的参数指定这些,并将它们保存在对象中。
2·Listing 1 shows the code for this tooltip.
清单1显示了这个工具提示的代码。
3·Decide for yourself whether these differences are improvements, and whether they are worth the time and effort you invested in developing your own tooltip widget.
您可以自己判断这些差异是否有改进,是否值得花时间和精力来开发自己的工具提示部件。
4·More than one tooltip can be visible concurrently, some fading out while another fades in.
同时可有多个工具提示可视,一些淡出,一些淡入。
5·Notice the value of the hostname variable as a tooltip.
请注意作为工具提示的主机变量的值。