热门标签:   个人网站   个人网页   WAP网站   网页特效   网页教程   收藏本站   设为主页  
首 页   个人网站   个人博客   WAP网站   网页特效   网页教程   软件教程   我要参展
帐 号: 密 码:
 
网站及资源搜索:  
 
  当前位置 > 中国个人网页秀-> 网页特效-> 功能代码-> 跟随下拉框的广告代码
跟随下拉框的广告代码
整理:Cnwshow.Com   来源:Internet   整理时间:2008-3-1

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>跟随下拉框的广告代码</title>
</head>

<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div id=divMenu style="Z-INDEX: 1; LEFT: 900px; WIDTH: 80px; POSITION: absolute; TOP: 84px;

HEIGHT: 191px; background-color: #330033; layer-background-color: #330033; border: 1px none

#000000;"> 45345 </div>
<script language=JavaScript>
var bNetscape4plus = (navigator.appName == "Netscape" &&

navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" &&

navigator.appVersion.substring(0,1) >= "4");
function CheckUIElements(){
      var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

      if ( bNetscape4plus ) {
              yMenuFrom   = document["divMenu"].top;
              yMenuTo     = top.pageYOffset + 295;
      }
      else if ( bExplorer4plus ) {
              yMenuFrom   = parseInt (divMenu.style.top, 10);
              yMenuTo     = document.body.scrollTop + 135; //距页面顶部的距离
      }

      timeoutNextCheck = 500;

      if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
              setTimeout ("CheckUIElements()", timeoutNextCheck);
              return;
      }

      if ( yButtonFrom != yButtonTo ) {
              yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
              if ( yButtonTo < yButtonFrom )
                      yOffset = -yOffset;

              if ( bNetscape4plus )
                      document["divLinkButton"].top += yOffset;
              else if ( bExplorer4plus )
                      divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) +

yOffset;

              timeoutNextCheck = 10;
      }
      if ( yMenuFrom != yMenuTo ) {
              yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
              if ( yMenuTo < yMenuFrom )
                      yOffset = -yOffset;

              if ( bNetscape4plus )
                      document["divMenu"].top += yOffset;
              else if ( bExplorer4plus )
                      divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;

              timeoutNextCheck = 10;
      }

      setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function OnLoad()
{
      var y;
      if ( top.frames.length )
      if ( bNetscape4plus ) {
              document["divMenu"].top = top.pageYOffset + 135;
              document["divMenu"].visibility = "visible";
      }
      else if ( bExplorer4plus ) {
              divMenu.style.top = document.body.scrollTop + 235;
              divMenu.style.visibility = "visible";
      }
      CheckUIElements();
      return true;
}
OnLoad();
</script>
<table width="778" height="1500" border="0" align="center" cellpadding="0" cellspacing="0"

bgcolor="f4f4f4">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
</BODY></HTML>
运行代码预览特效
  功能代码 热门点击
·横向滚动图片代码
·右下角提示消息广告代码
·页面随意漂浮广告代码
·跟随下拉框的广告代码
·查看指定网址的源文件
·大幅自动轮换代码
·查看网址代码
·交叉分离式广告代码
·带关闭开关的对联广告代码
·向左移动的广告代码
  酷站推荐
关于本站  联系本站  免责声明  使用帮助  网站搜索  网站地图
Copyright © 2005-2008 Cnwshow.Com Inc All Rights Reserved 中国个人网页秀
技术支持:网秀科技   QQ群:36941957  客服QQ:151483161  粵ICP备05134415号