打印

文字类型html特效

两个文件组成:
1、在文件<body>~</body>中加入:
<IFRAME marginWidth=0 marginHeight=0 src="111.htm" frameBorder=0 noResize width=100% scrolling=no height=20></IFRAME>
2、新建一个文件111.htm
代码如下:
<HTML>
<HEAD>
<TITLE>11111</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=JAVASCRIPT>
<!--

// --- Global variable stuff here
       var theItemCount;
       var theCurrentStory;
       var theCurrentLength;
       var theStorySummary;
       var theTargetLink;
       var theCharacterTimeout;
       var theStoryTimeout;
       var theBrowserVersion;
       var theWidgetOne;
       var theWidgetTwo;
       var theSpaceFiller;
       var theLeadString;
       var theStoryState;

       theBrowserVersion = parseInt(navigator.appVersion);

       function startTicker()
       {
          theBrowserVersion = parseInt(navigator.appVersion);

// ------ Set up initial values
          theCharacterTimeout = 30;
          theStoryTimeout     = 1000;
          theWidgetOne        =  "_";
          theWidgetTwo        =  "-";



// ------ Set up initial values
          theStoryState       = 1;
          theItemCount        = document.body.children.incoming.children.properties.children.itemcount.innerText;
          theCurrentStory     = 0;
          theCurrentLength    = 0;
          theLeadString       = " ";
          theSpaceFiller      = " ";


// ------ Begin the ticker      
          runTheTicker();
       }



// --- The basic rotate function
       function runTheTicker()
       {
          if(theStoryState == 1)
          {
             setupNextStory();
          }

          if(theCurrentLength != theStorySummary.length)
          {
             drawStory();
          }
          else
          {
             closeOutStory();
          }
       }



// --- Index to next story
       function setupNextStory()
       {
          theStoryState = 0;

          theCurrentStory++;

          theCurrentStory = theCurrentStory % theItemCount;
         
          theStorySummary = document.body.children.incoming.children.stories.children[theCurrentStory].children.Summary.innerText;

          theTargetLink   = document.body.children.incoming.children.stories.children[theCurrentStory].children.SiteLink.innerText;

          if(theTargetLink == "")
          {
             theTargetLink = document.body.children.incoming.children.stories.children[theCurrentStory].children.UrlLink.innerText;
          }
   
          theCurrentLength = 0;

          document.all.hottext.href = theTargetLink;
       }



// --- Draw a teletype line
       function drawStory()
       {
          var myWidget;
         
          if((theCurrentLength % 2) == 1)
          {
             myWidget = theWidgetOne;
          }
          else
          {
             myWidget = theWidgetTwo;
          }
          document.all.hottext.innerHTML = theLeadString + theStorySummary.substring(0,theCurrentLength) + myWidget + theSpaceFiller;
          theCurrentLength++;
          setTimeout("runTheTicker()", theCharacterTimeout);
       }



// --- Finalise the item
       function closeOutStory()
       {
          document.all.hottext.innerHTML = theLeadString + theStorySummary + theSpaceFiller;
          theStoryState = 1;
          setTimeout("runTheTicker()", theStoryTimeout);
       }
      
      
      
//-->
</SCRIPT>
<style type="text/css">
A.link{text-decoration:none;color:#990000;font-size:12px}
A.visited{text-decoration:none;color:#990000;font-size:12px}
A.hover{text-decoration:underline;color:#000000;font-size:12px}
</style>

</HEAD>
<BODY bgColor=#f2f2f2 leftMargin=0 topMargin=3 onload=startTicker(); vlink="#009900">
<DIV id=visible><A id="hottext"></A></DIV>
<DIV id=incoming style="DISPLAY: none">
       <DIV id=stories>
              <DIV id=1>
                     <DIV id=Summary>Dreamweaver常见问答解答</DIV>
                     <DIV id=UrlLink>index.asp?id=1</DIV>
                     <DIV id=SiteLink></DIV>
              </DIV>
              <DIV id=2>
                     <DIV id=Summary>可以放入更多的链接</DIV>
                     <DIV id=UrlLink>index.asp?id=2</DIV>
                     <DIV id=SiteLink></DIV>
              </DIV>
              <DIV id=3>
                     <DIV id=Summary>那里有BBS的源代码下载 </DIV>
                     <DIV id=UrlLink>index.asp?id=3</DIV>
                     <DIV id=SiteLink></DIV></DIV>

       </DIV>
       <DIV id=properties><DIV id=itemcount>3</DIV></DIV>
</DIV>  
</BODY></HTML>
写这些代码我是想请教高手,里面的链接能否改样式??谢谢
在线等……
我顶……
为什么没有人回复??
我再顶!!帮帮忙吧!

TOP

还在为头像烦恼?还在为不能关注好友动态烦忧?快来蓝色理想家园吧!
你这个有问题啊。显示不了哦
《卧春》
暗梅幽闻花,卧枝伤恨底,遥闻卧似水,易透达春绿。岸似绿,岸似透绿,岸似透黛绿。

TOP