tool tip
simple code to show tool tip
AI
Résumé par IA: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Code source
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function tooltip_show(txttip) {
tooltip.style.posTop = event.y;
tooltip.style.posLeft = event.x;
tooltext.innerHTML = txttip;
tooltip.style.visibility = 'visible';
}
function tooltip_hide() {
tooltip.style.visibility = 'hidden';
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<div id="tooltip" style="{z-index:10;visibility:hidden; position:absolute; }">
<table border="0" align="center" bgcolor="#ffffe0" cellpadding="2" cellspacing="0" style="{BORDER-WIDTH: 1px; BORDER-BOTTOM-COLOR: #ffffff; BORDER-BOTTOM-STYLE: outset; BORDER-LEFT-COLOR:#ffffff; BORDER-LEFT-STYLE:outset; BORDER-RIGHT-COLOR:#ffffff; BORDER-RIGHT-STYLE:outset; BORDER-TOP-STYLE:outset; BORDER-TOP-COLOR:#ffffff;}">
<tr>
<td align="center"><FONT face="verdana" COLOR="#000000" SIZE="1">
<span id="tooltext">
</span>
</font>
</td>
</tr>
</table>
</div>
<TABLE WIDTH=75% BORDER=1 CELLSPACING=1 CELLPADDING=1>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD>d</TD>
<TD>d</TD>
<TD>d</TD>
</TR>
<div id="row20" style="{position:absolute;}" >
<TR>
<TD id="atd" LANGUAGE=javascript >d</TD>
<TD><input type="text" id="name" value="" LANGUAGE=javascript onmouseenter="return tooltip_show('Enter your Name')" onmouseleave="return tooltip_hide()"></TD>
<TD>d</TD>
</TR>
</div>
</TABLE>
<P> </P>
</BODY>
</HTML>
Many people still submit code which includes a line like this: <br><br>
#include <iostream.h> <br><br> and so I would like to explain how this is wrong, this is an old old header, and should not be used in modern code... Right now it does not cause problems, but there is a possibility that in future revisions of the C++ standard that the .h headers will be completely obsolete. <br><br>
<iostream.h> includes the old style iostream classes, and originally was required. This is obsolete according to the new c++ standard, which specifies that .h should not be used on standard header files. If you are in need of the old C headers you should use these: <br><br>
<cmath> <br>
<cstdlib> <br>
<cstring> <br>
<cstdio> <br> etc.. basically you place a c in front of the old name and remove the .h.
So far this syntax for leaving of the .h only causes conflict in one area, the STL string class. String manipulations (using char*-null-terminated strings) are contained in <string.h>, and <string> includes the nice STL string class which is much easier than using char* strings, so in C++ string.h should be refered to as <cstring> to avoid confusion. <br><br><br><b>
A word of caution:
when using the .h-less header files most compilers require an extra line after the final include statment:
using namespace std;
This namespace will allow you to access all of the members of the .h-less headers properly and easily (so to use cout and cin you dont have to type std::cout, or std::cin, etc.)
</b><br>
Commentaires originaux (3)
Récupéré via Wayback Machine