template_hint.js
上传用户:wenllgg125
上传日期:2020-04-09
资源大小:7277k
文件大小:3k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. <!--
  2. //***********默认设置定义.*********************
  3. tPopWait=50; //停留tWait豪秒后显示提示。
  4. tPopShow=6000; //显示tShow豪秒后关闭提示
  5. showPopStep=20;
  6. popOpacity=95;
  7. fontcolor="#000000";
  8. bgcolor="#ffffff";
  9. bordercolor="#000000";
  10. //***************内部变量定义*****************
  11. sPop=null;
  12. curShow=null;
  13. tFadeOut=null;
  14. tFadeIn=null;
  15. tFadeWaiting=null;
  16. document.write("<style type='text/css' id='defaultPopStyle'>");
  17. document.write(".cPopText {  background-color: " + bgcolor + ";color:" + fontcolor + "; border: 1px " + bordercolor + " solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
  18. document.write("</style>");
  19. document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");
  20. function showPopupText(){
  21. var o=event.srcElement;
  22. MouseX=event.x;
  23. MouseY=event.y;
  24. if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
  25.         if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
  26. if(o.dypop!=sPop) {
  27. sPop=o.dypop;
  28. clearTimeout(curShow);
  29. clearTimeout(tFadeOut);
  30. clearTimeout(tFadeIn);
  31. clearTimeout(tFadeWaiting);
  32. if(sPop==null || sPop=="") {
  33. dypopLayer.innerHTML="";
  34. dypopLayer.style.filter="Alpha()";
  35. dypopLayer.filters.Alpha.opacity=0;
  36. }
  37. else {
  38. if(o.dyclass!=null) popStyle=o.dyclass 
  39. else popStyle="cPopText";
  40. curShow=setTimeout("showIt()",tPopWait);
  41. }
  42. }
  43. }
  44. function showIt(){
  45. dypopLayer.className=popStyle;
  46. dypopLayer.innerHTML=sPop;
  47. popWidth=dypopLayer.clientWidth;
  48. popHeight=dypopLayer.clientHeight;
  49. if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
  50. else popLeftAdjust=0;
  51. if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
  52. else popTopAdjust=0;
  53. dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
  54. dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
  55. dypopLayer.style.filter="Alpha(Opacity=0)";
  56. fadeOut();
  57. }
  58. function fadeOut(){
  59. if(dypopLayer.filters.Alpha.opacity<popOpacity) {
  60. dypopLayer.filters.Alpha.opacity+=showPopStep;
  61. tFadeOut=setTimeout("fadeOut()",1);
  62. }
  63. else {
  64. dypopLayer.filters.Alpha.opacity=popOpacity;
  65. tFadeWaiting=setTimeout("fadeIn()",tPopShow);
  66. }
  67. }
  68. function fadeIn(){
  69. if(dypopLayer.filters.Alpha.opacity>0) {
  70. dypopLayer.filters.Alpha.opacity-=1;
  71. tFadeIn=setTimeout("fadeIn()",1);
  72. }
  73. }
  74. document.onmouseover=showPopupText;
  75. -->