预览模式: 普通 | 列表

改变Title样式的javascript代码

//***********默认设置定义.*********************
tPopWait=50;//停留tWait豪秒后显示提示。
tPopShow=5000;//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=99;

//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;

document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText {  background-color: #F8F8F5;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");


function showPopupText(){
var o=event.srcElement;
 MouseX=event.x;
 MouseY=event.y;
 if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
        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=="") {
    dypopLayer.innerHTML="";
    dypopLayer.style.filter="Alpha()";
    dypopLayer.filters.Alpha.opacity=0; 
    }
   else {
    if(o.dyclass!=null) popStyle=o.dyclass
     else popStyle="cPopText";
    curShow=setTimeout("showIt()",tPopWait);
   }
   
 }
}

查看更多...

Tags: javascript

分类:技术文章 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3639

痛苦是快乐之母,唯有痛苦才能让稚嫩的心灵变得成熟!

分类:随笔杂记 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2915

if   (typeOf(x)   ==   "undefined"){  
      alert("undefined");  
  }  
  else   if   (typeOf(x)   ==   "null")   {  
      alert("null");  
  }  
   
  如果在server端的js中可以写成:  
  if   (isUndefined(x))  
  if   (isNull(x))

 

查看更多...

Tags: javascript

分类:技术文章 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 7056

 广告位

↑返回顶部↑