当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 如果一个网页内有几个框架,用axwebbrowser怎样读取指定框架的内容?在线等待 谢谢! ......
    摘要: 就是建一个“安装和部署项目”,在里面实现windows服务程序的安装。 ......


怎样在浏览器状态栏显示一行滚动的字

怎样在浏览器状态栏显示一行滚动的字,  
  是不是有点弱智,但我真的不会,谢谢大家了

NO.1   作者: coffee_cn

不是弱,慢慢来  
  不过你可以先搜索搜索呀  
  到这里搜索  
  或者到google里面搜索  
 

NO.2   作者: lei414

<SCRIPT   language="JavaScript">  
  <!--  
  function   scrollit(seed)   {  
  var   m1   =   "HI,您   好   !                         ";  
  var   m2   =   "欢   迎   访   问   xx   网   !               ";  
  var   m3   =   "请   多   提   意   见,谢   谢   !                     ";  
  var   m4   =   "E-MAIL:webmaster@kings2.net                     ";  
  var   m5   =   "http://www.kings2.net                       ";  
  var   msg=m1+m2+m3+m4+m5;  
  var   out   =   "   ";  
  var   c   =   1;  
  if   (seed   >   100)   {  
  seed--;  
  cmd="scrollit("+seed+")";  
  timerTwo=window.setTimeout(cmd,100);  
  }  
  else   if   (seed   <=   100   &&   seed   >   0)   {  
  for   (c=0   ;   c   <   seed   ;   c++)   {  
  out+="   ";  
  }  
  out+=msg;  
  seed--;  
  window.status=out;  
  cmd="scrollit("+seed+")";  
  timerTwo=window.setTimeout(cmd,100);  
  }  
  else   if   (seed   <=   0)   {  
  if   (-seed   <   msg.length)   {  
  out+=msg.substring(-seed,msg.length);  
  seed--;  
  window.status=out;  
  cmd="scrollit("+seed+")";  
  timerTwo=window.setTimeout(cmd,100);  
  }  
  else   {  
  window.status="   ";  
  timerTwo=window.setTimeout("scrollit(100)",75);  
  }  
  }  
  }  
  //-->  
  第二步:把如下代码加入<body>区域中  
  <body   background=bag.gif   onLoad="scrollit(100)">  
 

NO.3   作者: dicklee1214

<html>  
   
  <head>  
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312">  
  <meta   name="GENERATOR"   content="Microsoft   FrontPage   4.0">  
  <meta   name="ProgId"   content="FrontPage.Editor.Document">  
  <title>多变的状态栏文字</title>  
  </head>  
  <script   language="vbscript">  
  <!--  
  dim   tid  
  dim   scroll_msg,scroll_out,scroll_pos,scroll_delay  
  scroll_msg="欢迎你使用VBScript编程百例"  
  scroll_out=""  
  scroll_pos=100  
  scrol_delay=5  
  sub   scroller  
        for   i=1   to   scroll_pos  
              scroll_out=scroll_out&"   "  
        next  
        if   scroll_pos>0   then  
              scroll_out=scroll_out&scroll_msg  
        else  
              scroll_out=mid(scroll_msg,-scroll_pos+1,len(scroll_msg))        
        end   if  
        window.status=scroll_out  
        scroll_out=""  
        scroll_pos=scroll_pos-1  
        if   scroll_pos<-len(scroll_msg)   then   scroll_pos=100  
              tid=settimeout("scroller()",scroll_delay)  
  end   sub  
  function   snapin(jumpspaces,position)  
        dim   msg  
        msg=scroll_msg  
        dim   out  
        out=""  
        for   i=1   to   position  
              out=out&mid(msg,i,1)  
        next  
        for   i=1   to   jumpspaces-1  
              out=out&"   "  
        next  
        out=out&mid(msg,position+1,1)  
        window.status=out  
        if   (jumpspaces<=1)   then  
              position=position+1  
              if   mid(msg,position,1)="   "   then   position=position+1  
              jumpspaces=100-position  
        else  
              if   (jumpspaces>3)   then  
                    jumpspaces=jumpspaces*0.75  
              else  
                    jumpspaces=jumpspaces-1        
              end   if        
        end   if  
        if   (position<len(msg))   then  
              cmd="snapin   "&jumpspaces&","&position  
              tid=window.settimeout(cmd,scroll_delay)  
        else  
              window.status=""  
              jumpspaces=100  
              position=1  
              cmd="snapin   "&jumpspaces&","&position  
              tid=window.settimeout(cmd,scroll_delay)        
        end   if  
  end   function  
  -->  
  </script>  
  <script   language="vbscript">  
  dim   speed  
  speed=200  
  dim   messages(2)  
  messages(0)="欢迎你使用VBScript编程百例"  
  messages(1)="有问题请和本出版社联系"  
  messages(2)="谢谢你的支持"  
  dim   currentmessage  
  currentmessage=0  
  dim   offset  
  offset=0  
  sub   showbanner  
        dim   text  
        text=messages(currentmessage)  
        if   offset<len(text)   then  
              if   mid(text,offset+1,1)="   "   then   offset=offset+1  
                    dim   partialmessage  
                    partialmessage=mid(text,1,offset+1)  
                    window.status=partialmessage  
                    offset=offset+1  
                    tid=settimeout("showbanner",speed)  
        else  
              offset=0  
              currentmessage   =currentmessage+1  
              if   (currentmessage>ubound(messages))   then   currentmessage=0  
              tid=settimeout("showbanner",pause)  
        end   if                        
  end   sub  
  </script>  
  <body   bgcolor=peachpuff>  
  <center>  
  <h1><font   color=red>文字显示状态</font></h1>  
  <input   type=button   value="雨   点   式"   id=button2   name=button2   onclick="cleartimeout(tid):snapin   100,1">  
  <br><br>  
  <input   type=button   value="多行舒展式"   id=button3   name=button3   onclick="cleartimeout(tid):showbanner">  
  </center>  
  </body>  
   
  </html>  
  一步搞定


    摘要: js源码: function handin() { if (!validatemode()) return; var strhtmlbegin; var strhtmlend; strhtmlbegin = " "; strhtmlend = " "; self.opener.artform.txtcontent.value+=strhtmlbegi......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE