最新更新 sitemap 网站制作设计本站搜索
网页设计
国外网站 韩国网站 个人主页 手提袋设计 CSS 网页特效 平面设计 网站设计 Flash CMS技巧 服装网站 php教程 photoshop 画册 服务器选用 数据库 Office
虚拟主机 域名注册 云主机 网页设计 客服QQ:8208442
当前位置:首页 > 网页JS特效 > 文本特效类

网页特效:文字特殊显示

日期:09-05    来源:中国设计秀    作者:cnwebshow.com

下面框中为脚本显示区
<script language="JavaScript" type="text/javascript"> </script>

 

uzt中国设计秀

 uzt中国设计秀

欢迎光临南京有线台!uzt中国设计秀

<script language="JavaScript" type="text/javascript"> </script>

脚本说明:uzt中国设计秀
把如下代码加入<body>区域中:uzt中国设计秀
<script language="JavaScript">uzt中国设计秀
<!--uzt中国设计秀

uzt中国设计秀
IE4 = navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4; uzt中国设计秀
NS4 = navigator.appName.substring(0,8) == "Netscape" && parseInt(navigator.appVersion) >= 4;uzt中国设计秀
 uzt中国设计秀
// checkBrowser() -- Checks whether the browser is new enough for some DynamicMovement ...uzt中国设计秀

function checkBrowser(){uzt中国设计秀
 if(IE4 || NS4){uzt中国设计秀
  return true;uzt中国设计秀
 }uzt中国设计秀
 return false;uzt中国设计秀
}uzt中国设计秀

// movableObj() -- Creates a new movable objectuzt中国设计秀

function movableObj(startX, startY, endX, endY, delay, speed, refId){uzt中国设计秀
 this.sX = startX; this.sY = startY; this.eX = endX;uzt中国设计秀
 this.eY = endY; this.de = delay; this.sp = speed;uzt中国设计秀
 this.ref = refId;uzt中国设计秀
 xL = endX - startX;uzt中国设计秀
 yL = endY - startY;uzt中国设计秀
 with (Math){uzt中国设计秀
  if(abs(xL) > abs(yL)){uzt中国设计秀
   this.xS = (xL > 0)?1:-1;uzt中国设计秀
   this.yS = (yL > 0)?abs(yL / xL):-abs(yL / xL);uzt中国设计秀
   this.howManySteps = abs(xL / speed);uzt中国设计秀
  } else if(abs(yL) > abs(xL)){uzt中国设计秀
   this.yS = (yL > 0)?1:-1;uzt中国设计秀
   this.xS = (xL > 0)?abs(xL / yL):-abs(xL / yL);uzt中国设计秀
   this.howManySteps = abs(yL / speed);uzt中国设计秀
  } else {uzt中国设计秀
   this.yS = (yL > 0)?1:-1;uzt中国设计秀
   this.xS = (xL > 0)?1:-1;uzt中国设计秀
   this.howManySteps = abs(xL / speed);uzt中国设计秀
  }uzt中国设计秀
 }uzt中国设计秀
 this.startMovement = startMovement;uzt中国设计秀
}uzt中国设计秀

// startMovement() -- starts the movementuzt中国设计秀

function startMovement(){uzt中国设计秀
 if(checkBrowser()){uzt中国设计秀
  if(IE4){uzt中国设计秀
   ref = document.all(this.ref).style;uzt中国设计秀
  } else {uzt中国设计秀
   ref = document[this.ref];uzt中国设计秀
  }uzt中国设计秀
  doDynamicMovement(this.sX, this.sY, this.eX, this.eY, this.de, this.xS, this.yS, ref, this.sp, this.howManySteps);uzt中国设计秀
 }uzt中国设计秀
}uzt中国设计秀

// doDynamicMovement() -- does the Dynamic Movementuzt中国设计秀

function doDynamicMovement(curX, curY, eX, eY, sp, xS, yS, ref, speed, hS){uzt中国设计秀
 if(Math.floor(hS - 1) != 0){uzt中国设计秀
  hS--;uzt中国设计秀
  curX += xS * speed;uzt中国设计秀
  curY += yS * speed;uzt中国设计秀
  ref.left = Math.round(curX);uzt中国设计秀
  ref.top = Math.round(curY);uzt中国设计秀
  setTimeout("doDynamicMovement(" + curX + ", " + curY + ", " + eX + ", " + eY + ", " + sp + ", " + xS + ", " + yS + ", ref, " + speed + ", " + hS + ")", sp);uzt中国设计秀
 } else {uzt中国设计秀
  setPos(eX, eY, ref); uzt中国设计秀
 }uzt中国设计秀
}uzt中国设计秀

// setPos() -- sets the end position accurately when doDynamicMovement has done its jobuzt中国设计秀

function setPos(x, y, ref){uzt中国设计秀
 ref.left = x;uzt中国设计秀
 ref.top = y;uzt中国设计秀
}uzt中国设计秀

// -->uzt中国设计秀
</script>uzt中国设计秀

uzt中国设计秀
<table width="600">uzt中国设计秀
  <tr>uzt中国设计秀
    <td><font face="Verdana, Arial"><h3>  </h3>uzt中国设计秀
    <font size="2"><form>uzt中国设计秀
      <div align="center"><center><p><input type="button" onClick="dynaText.startMovement()"uzt中国设计秀
      value="按下去看看"> </p>uzt中国设计秀
      </center></div>uzt中国设计秀
    </form>uzt中国设计秀
    <p>  </font></p>uzt中国设计秀
    <div id="wow"uzt中国设计秀
    style="position: absolute; left: -100; top: -100; width: 300;uzt中国设计秀
  font-family: Verdana, Arial; font-size: 20pt"><p>欢迎光临南京有线台! uzt中国设计秀
    </font></p>uzt中国设计秀
    </div></td>uzt中国设计秀
  </tr>uzt中国设计秀
</table>uzt中国设计秀
<script language="JavaScript">uzt中国设计秀
<!--uzt中国设计秀

// Here we define the movable objectuzt中国设计秀
dynaText = new movableObj(-100,-100,80,180,10,10,"wow");uzt中国设计秀

// -->uzt中国设计秀
</script>uzt中国设计秀
uzt中国设计秀
uzt中国设计秀
 uzt中国设计秀

本文引用地址:/js/article_61611.html
网站地图 | 关于我们 | 联系我们 | 网站建设 | 广告服务 | 版权声明 | 免责声明