Guest User

Untitled

a guest
Jul 17th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. <html>
  2. <head>
  3. <style type="text/css">
  4. div.tip {
  5. position: absolute;
  6. background-color: yellow;
  7. width: 200px;
  8. display:none;
  9. border-style: solid;
  10. border: thin solid Black;
  11. }
  12. </style>
  13.  
  14. <script language="JavaScript1.2">
  15. var IE = document.all?true:false;
  16. if (!IE)
  17. document.captureEvents(Event.MOUSEMOVE)
  18. document.onmousemove = getMouseXY;
  19. var tempX = 0;
  20. var tempY = 0;
  21. function getMouseXY(e) {
  22. if (IE) {
  23. tempX = event.clientX;
  24. tempY = event.clientY;
  25. }
  26. else {
  27. tempX = e.pageX;
  28. tempY = e.pageY;
  29. }
  30. if (tempX < 0){tempX = 0;}
  31. if (tempY < 0){tempY = 0;}
  32. return true;
  33. }
  34.  
  35. function showtip(id){
  36. // alert('in here' + tempX);
  37. document.getElementById(id).style.top=tempY;
  38. document.getElementById(id).style.left=tempX;
  39. document.getElementById(id).style.display="block";
  40. }
  41.  
  42. function hidetip(id){
  43. document.getElementById(id).style.display="none";
  44. }
  45.  
  46. </script>
  47.  
  48. </head>
  49. <body>
  50.  
  51. <div id="help" class="tip">
  52. This is where the help will come <br/>
  53. this is the second line
  54. </div>
  55.  
  56. <div id="help2" class="tip">
  57. This is the help for #2 test<br />
  58. <ol>
  59. <li>one</li>
  60. <li>two</li>
  61. <li>three</li>
  62. </ol>
  63. </div>
  64.  
  65. There is no help for this text There is no help for this text There is no help for this text
  66. 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
  67.  
  68. <p onmouseover="javascript:showtip('help')" onmouseout="hidetip('help')">
  69. 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
  70. </p>
  71.  
  72. <p>Now is the time
  73. <a onmouseover="javascript:showtip('help2')" onmouseout="hidetip('help2')">
  74. <u>Answer</u>
  75. </a>
  76. for all good men.
  77. </p>
  78. </body>
  79. </html>
Add Comment
Please, Sign In to add comment