Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style type="text/css">
- div.tip {
- position: absolute;
- background-color: yellow;
- width: 200px;
- display:none;
- border-style: solid;
- border: thin solid Black;
- }
- </style>
- <script language="JavaScript1.2">
- var IE = document.all?true:false;
- if (!IE)
- document.captureEvents(Event.MOUSEMOVE)
- document.onmousemove = getMouseXY;
- var tempX = 0;
- var tempY = 0;
- function getMouseXY(e) {
- if (IE) {
- tempX = event.clientX;
- tempY = event.clientY;
- }
- else {
- tempX = e.pageX;
- tempY = e.pageY;
- }
- if (tempX < 0){tempX = 0;}
- if (tempY < 0){tempY = 0;}
- return true;
- }
- function showtip(id){
- // alert('in here' + tempX);
- document.getElementById(id).style.top=tempY;
- document.getElementById(id).style.left=tempX;
- document.getElementById(id).style.display="block";
- }
- function hidetip(id){
- document.getElementById(id).style.display="none";
- }
- </script>
- </head>
- <body>
- <div id="help" class="tip">
- This is where the help will come <br/>
- this is the second line
- </div>
- <div id="help2" class="tip">
- This is the help for #2 test<br />
- <ol>
- <li>one</li>
- <li>two</li>
- <li>three</li>
- </ol>
- </div>
- There is no help for this text There is no help for this text There is no help for this text
- There is no help for this text There is no help for this text There is no help for this text There is no help for this text
- <p onmouseover="javascript:showtip('help')" onmouseout="hidetip('help')">
- There is HELP for this There is HELP for this There is HELP for this There is HELP for this There is HELP for this There is HELP for this
- </p>
- <p>Now is the time
- <a onmouseover="javascript:showtip('help2')" onmouseout="hidetip('help2')">
- <u>Answer</u>
- </a>
- for all good men.
- </p>
- </body>
- </html>
Add Comment
Please, Sign In to add comment