电脑十万个为什么

第41章


(HTML  Layout  控件也是  ActiveX  ControlPad  的一部分,可通过  MSDN  库安装。由于提供了基于  WYSIWYG(所见即所得)页的全帧编辑器,ActiveX  Control  Pad  可以与  HTML  Layout  Control  相结合使用。  这使得用  ActiveX  控件开发先进的二维风格的  HTML  设计变得更加简单。    
    30,Q:怎样在网页上显示多少人在线(on-line)?
        A:只要你的网站支持  ASP,那么在网站的根目录中放置以下内容的  Global.asa  文件,问题就解决了。将语句  〈%  response.write  "现在有  "  &  Application("WhosOn")  &  "  人在线。"  %〉  放在你的  ASP  网页中用于显示在线人数。  
          Sub  Application_OnStart                                                            
              Session.Timeout=1                                                            
              Application.Lock                                                            
              Application("WhosOn")  =  0                                                            
              Application.UnLock                                                            
          End  Sub                                                            
          Sub  Session_OnStart                                                            
              Application.Lock                                                            
              Application("WhosOn")  =  Application("WhosOn")  +  1                                                            
              Application.UnLock                                                            
          End  Sub                                                            
          Sub  Session_OnEnd                                                            
              Application.Lock                                                            
              Application("WhosOn")  =  Application("WhosOn")  -  1                                                            
              Application.UnLock                                                            
          End  Sub                                                            
    31,Q:用样式表(CSS)定制表格边框:
        A:
        〈Table  border=0  id=tb1  style="border:3px  solid  red"〉
        〈tr〉〈td〉用样式表(CSS)定制表格的例子〈/td〉〈/tr〉
        〈/Table〉    
    32,Q:闪亮的表格边框:
        A:
          制做闪亮的表格边框!
      
    33,Q:JavaScript  实现的简单时钟:
        A:
      (1)在〈Head〉〈/Head〉之间放置以下脚本:
      12)  ?  hours  -12  :hours)
      timeValue  +=  ((minutes  =  12)  ?  "  P.M."  :  "  A.M."
      document.clock.face.value  =  timeValue;
      timerID  =  setTimeout("showtime()",1000);
      timerRunning  =  true;
      }
      function  startclock  ()
      {  stopclock();
      showtime();  
      }
      //-->
      (2)在〈Body〉属性中加  onLoad="startclock()"
      (3)在〈Body〉〈/Body〉中间加
      即可。
小说推荐
返回首页返回目录