爱问知识人 爱问教育 医院库

网页制作(DIV JAVASCRIPT)问题

首页

网页制作(DIV+JAVASCRIPT)问题


        

提交回答
好评回答
  • 2018-03-31 10:29:43
      //默认设置定义tPopWait=50;//停留tWait豪秒后显示提示。//tPopShow=2000;//显示tShow豪秒后关闭提示showPopStep=100;popOpacity=70;fontcolor="#0000FF";bgcolor="#EDEDED";bordercolor="#0000FF";//内部变量定义sPop=null;curShow=null;tFadeOut=null;tFadeIn=null;tFadeWaiting=null;document。
      write("<styletype='text/css'id='defaultPopStyle'>");document。write("。cPopText{background-color:"+bgcolor+";color:"+fontcolor+"; "+bordercolor+"solid;font- :12px;padding- :4px; :4px;padding- :Alpha(Opacity=0)}");document。
      write("</style>");document。write("<divid='dypopLayer'style=':1000;'class='cPopText'></div>");functionshowPopupText(){varo= cElement;MouseX=event。
      x;MouseY=event。y;if( t!=null&& t!=""){o。dypop= t; t=""};if(o。title!=null&&o。title!=""){o。dypop=o。title;o。
      title=""};if(o。dypop!=sPop){sPop=o。dypop;clearTimeout(curShow);clearTimeout(tFadeOut);clearTimeout(tFadeIn);clearTimeout(tFadeWaiting);if(sPop==null||sPop==""){ nerHTML=""; lter="Alpha()";dypopLaye lters。
      Alpha。opacity=0;}else{if(o。dyclass!=null)popStyle=o。dyclasselsepopStyle="cPopText";curShow=setTimeout("showIt()",tPopWait);}}}functionshowIt(){ assName=popStyle; nerHTML=sPop;popWidth= ientWidth;popHeight= ientHeight;if(MouseX+12+popWidth> ientWidth)popLeftAdjust=-popWidth-24elsepopLeftAdjust=0;if(MouseY+12+popHeight> ientHeight)popTopAdjust=-popHeight-24elsepopTopAdjust=0; yle。
      left=MouseX+12+ rollLeft+popLeftAdjust; p=MouseY+12+ rollTop+popTopAdjust; lter="Alpha(Opacity=0)";fadeOut();}functionfadeOut(){if( lters。
      Alpha。opacity<popOpacity){ lters。Alpha。opacity+=showPopStep;tFadeOut=setTimeout("fadeOut()",1);}else{ lters。Alpha。opacity=popOpacity;//tFadeWaiting=setTimeout("fadeIn()",tPopShow);}}functionfadeIn(){if( lters。
      Alpha。opacity>0){ lters。Alpha。opacity-=1;tFadeIn=setTimeout("fadeIn()",1);}}document。onmouseover=showPopupText;-->这个是js文件,请把代码保存为js文件,用JavaScript来调用,慢慢体会吧,希望你的自学能力真的不错。
      

    M***

    2018-03-31 10:29:43

类似问题

换一换
  • 程序设计 相关知识

  • 电脑网络技术
  • 电脑网络

相关推荐

正在加载...
最新资料 推荐信息 热门专题 热点推荐
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):