乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      ASP技巧集錦1

       freezn 2006-03-25

      1.如何 最小化、最大化、關(guān)閉窗口
      答:<objectid=hh1classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
      <paramname="command"value="minimize"></object>

      1.如何 最小化、最大化、關(guān)閉窗口
      答:<objectid=hh1classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
      <paramname="command"value="minimize"></object>
      <objectid=hh2classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
      <paramname="command"value="maximize"></object>
      <objectid=hh3classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
      <paramname="command"value="close"></object>

      <inputtype=buttonvalue=最小化onclick=hh1.click()>
      <inputtype=buttonvalue=最大化onclick=hh2.click()>
      <inputtype=buttonvalue=關(guān)閉onclick=hh3.click()>

      2.如何靜止頁面緩存
      答:htm網(wǎng)頁
      <metahttp-equiv="pragma"content="no-cache">
      <metahttp-equiv="cache-control"content="no-cache,must-revalidate">
      <metahttp-equiv="expires"content="wed,26feb199708:21:57gmt">
      或者<metahttp-equiv="expires"content="0">
      asp網(wǎng)頁
      response.expires=-1
      response.expiresabsolute=now()-1
      response.cachecontrol="no-cache"
      php網(wǎng)頁
      header("expires:mon,26jul199705:00:00gmt");
      header("cache-control:no-cache,must-revalidate");
      header("pragma:no-cache");

      3.如何檢查一段字符串是否全由數(shù)字組成
      <scriptlanguage="javascript"><!--
      functionchecknum(str){returnstr.match(/\d/)==null}
      alert(checknum("1232142141"))
      alert(checknum("123214214a1"))
      file://--></script>

      4.如何獲取機器信息
      答本機ip<%=request.servervariables("remote_addr")%>
      服務(wù)器名<%=request.servervariables("server_name")%>
      服務(wù)器ip<%=request.servervariables("local_addr")%>
      服務(wù)器端口<%=request.servervariables("server_port")%>
      服務(wù)器時間<%=now%>
      iis版本<%=request.servervariables"server_software")%>
      腳本超時時間<%=server.scripttimeout%>
      本文件路徑<%=server.mappath(request.servervariables("script_name"))%>
      服務(wù)器cpu數(shù)量<%=request.servervariables("number_of_processors")%>
      服務(wù)器解譯引擎<%=scriptengine&"/" & scriptenginemajorversion &"." & scriptengineminorversion & "." & scriptenginebuildversion%>
      服務(wù)器操作系統(tǒng)<%=request.servervariables("os")%>1.如何讓日期相減
      日期減去天數(shù)等于第二個日期
      <scriptlanguage=javascript>
      functioncc(dd,dadd)
      {
      file://可以加上錯誤處理
      vard=newdate(dd.replace("-","/"))
      d.setdate(d.getdate()+dadd)
      alert(d.getfullyear()+"年"+(d.getmonth()+1)+"月"+d.getdate()+"日")
      }
      cc("2002-2-28",2)
      </script>


      1.怎樣通過asp的手段來檢查來訪者是否用了代理
      <%ifrequest.servervariables("http_x_forwarded_for")<>""then
      response.write"<fontcolor=#ff0000>您通過了代理服務(wù)器,"&_
      "真實的ip為"&request.servervariables("http_x_forwarded_for")
      endif
      %>


      獲得窗口的大小
      document.body.clientWidth,document.body.clientHeight
      document.body.offsetWidth,document.body.offsetHeight

      判斷一個表是否存在:
      if exists (select * from dbo.sysobjects where id = object_id(‘表名‘) and OBJECTPROPERTY(id, N‘IsUserTable‘) = 1)
      drop table 表名
      GO
      從publish 表中取出第 n 條到第 m 條的記錄:
      SELECT TOP m-n+1 *
      FROM publish
      WHERE (id NOT IN
            (SELECT TOP n-1 id
           FROM publish))

      id 為publish 表的關(guān)鍵字


      分類: js程序

      1.如何實現(xiàn)連續(xù)滾動

      <div id="marquees"><br/><br/>

      數(shù)據(jù)里面讀出來的<br/>
      </div>

      <script language="JavaScript">

      marqueesHeight=200;
      stopscroll=false;

      with(marquees){
      style.width=0;
      style.height=marqueesHeight;
      style.overflowX="visible";
      style.overflowY="hidden";
      noWrap=true;
      onmouseover=new Function("stopscroll=true");
      onmouseout=new Function("stopscroll=false");
      }
      document.write(‘<div id="templayer" style="position:absolute;z-index:1;visibility:hidden"></div>‘);

      preTop=0; currentTop=0;

      function init(){
      templayer.innerHTML="";
      while(templayer.offsetHeight<marqueesHeight){
      templayer.innerHTML+=marquees.innerHTML;
      }
      marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
      setInterval("scrollUp()",10);
      }
      document.body.onload=init;

      function scrollUp(){
      if(stopscroll==true) return;
      preTop=marquees.scrollTop;
      marquees.scrollTop+=1;
      if(preTop==marquees.scrollTop){
      marquees.scrollTop=templayer.offsetHeight-marqueesHeight;
      marquees.scrollTop+=1;
      }
      }
      </script>


       

      只針對圖片:
      <form name=form1 onsubmit="return mm()">
      <input type=file name=meizz><br/>
      <input type=submit value=submit></form>

      <SCRIPT LANGUAGE="JavaScript"><!--
      function mm()
      {
      var s = document.form1.meizz.value;
      if(s=="")return false;
      var img = new Image();
      img.src = s;
      alert("高 = "+ img.height + "\n寬 = "+ img.width);
      alert("fileSize = "+ img.fileSize +" 字節(jié)");
      return(img.fileSize <= 40000);
      }
      file://--></SCRIPT>


       

      1. oncontextmenu="window.event.returnvalue=false" 將徹底屏蔽鼠標右鍵
      <table border oncontextmenu=return(false)><td>no</table> 可用于Table

      2. <body onselectstart="return false"> 取消選取、防止復(fù)制

      3. onpaste="return false" 不準粘貼

      4. oncopy="return false;" oncut="return false;" 防止復(fù)制

      5. <link rel="Shortcut Icon" href="favicon.ico"> IE地址欄前換成自己的圖標

      6. <link rel="Bookmark" href="favicon.ico"> 可以在收藏夾中顯示出你的圖標

      7. <input style="ime-mode:disabled"> 關(guān)閉輸入法

      8. 永遠都會帶著框架
      <script language="javascript"><!--
      if (window == top)top.location.href = "frames.htm"; file://frames.htm為框架網(wǎng)頁
      // --></script>

      9. 防止被人frame
      <SCRIPT LANGUAGE=javascript><!--
      if (top.location != self.location)top.location=self.location;
      // --></SCRIPT>

      10. <noscript><iframe src=*.html></iframe></noscript> 網(wǎng)頁將不能被另存為

      11. <input type=button value=查看網(wǎng)頁源代碼
      onclick="window.location = ‘view-source:‘+ ‘http://www.csdn.net/‘">

      12. 怎樣通過asp的手段來檢查來訪者是否用了代理
      <% if Request.ServerVariables("HTTP_X_FORWARDED_FOR")<>"" then
      response.write "<font color=#FF0000>您通過了代理服務(wù)器,"& _
      "真實的IP為"&Request.ServerVariables("HTTP_X_FORWARDED_FOR")
      end if
      %>

      13. 取得控件的絕對位置

      file://javascript
      <script language="javascript">
      function getIE(e){
      var t=e.offsetTop;
      var l=e.offsetLeft;
      while(e=e.offsetParent){
      t+=e.offsetTop;
      l+=e.offsetLeft;
      }
      alert("top="+t+"\nleft="+l);
      }
      </script>

      file://VBScript
      <script language="VBScript"><!--
      function getIE()
      dim t,l,a,b
      set a=document.all.img1
      t=document.all.img1.offsetTop
      l=document.all.img1.offsetLeft
      while a.tagName<>"BODY"
      set a = a.offsetParent
      t=t+a.offsetTop
      l=l+a.offsetLeft
      wend
      msgbox "top="&t&chr(13)&"left="&l,64,"得到控件的位置"
      end function
      --></script>

      14. 光標是停在文本框文字的最后
      <script language="javascript">
      function cc()
      {
      var e = event.srcElement;
      var r =e.createTextRange();
      r.moveStart(‘character‘,e.value.length);
      r.collapse(true);
      r.select();
      }
      </script>
      <input type=text name=text1 value="123" onfocus="cc()">

      15. 判斷上一頁的來源
      asp:
      request.servervariables("HTTP_REFERER")

      javascript:
      document.referrer

       

      圖片顯示控制:
      <script language="JavaScript">
      <!--
      var flag=false;
      function DrawImage(ImgD){
      var image=new Image();
      image.src=ImgD.src;
      if(image.width>0 && image.height>0){
      flag=true;
      if(image.width/image.height>= 360/270){
      if(image.width>360){
      ImgD.width=360;
      ImgD.height=(image.height*360)/image.width;
      }else{
      ImgD.width=image.width;
      ImgD.height=image.height;
      }
      ImgD.alt=image.width+"×"+image.height;
      }
      else{
      if(image.height>270){
      ImgD.height=270;
      ImgD.width=(image.width*270)/image.height;
      }else{
      ImgD.width=image.width;
      ImgD.height=image.height;
      }
      ImgD.alt=image.width+"×"+image.height;
      }
      }
      }
      file://-->
      </script>

       

      調(diào)用格式:
      <img src="a.gif" onload="javascript:DrawImage(this);"

      用asp把doc轉(zhuǎn)換成html
      doc2html.vbs

      ‘**********************************************************

      ‘ 調(diào)用方法:doc2html c:\doc2html c:\doc2html
      ‘ 調(diào)用方法:doc2html -s c:\doc2html\a.doc c:\doc2html

      ‘**********************************************************

      Dim Objword
      Dim Objdoc
      Dim Objfso
      Dim Strsource
      Dim Strtarget
      Dim Bbatch

      ‘得到命令行參數(shù),有三種可能的格式:[-s] 要進行轉(zhuǎn)換的源文件目錄或文件 轉(zhuǎn)換成Html文件后保存的目錄
      Function Getparams()
      Dim Objarg
      If Wscript.Arguments.Count >= 2 Then
      If Wscript.Arguments.Item(0) = "-s" Or Wscript.Arguments.Item(0) = "-S" Then
      Strsource = Wscript.Arguments.Item(1)
      Strtarget = Wscript.Arguments.Item(2)
      Bbatch = False
      Else
      Strsource = Wscript.Arguments.Item(0)
      Strtarget = Wscript.Arguments.Item(1)
      Bbatch = True
      End If
      Else
      Wscript.Quit(1)
      End If
      End Function

      Function Batchprocessing()
      Dim Objfolder
      Dim Objfile
      Dim Lpos
      Dim Strfilename
      Lpos = 0
      Set Objfolder = Objfso.Getfolder(Strsource)
      For Each Objfile In Objfolder.Files
      Lpos = Instr(1,Mid(Objfile.Path,Len(Objfile.Path) - 3,4),"Doc",1)
      If Lpos > 0 Then
      Strfilename = Objfso.Getbasename(Objfile.Path)
      Wordinterface Objfile.Path,Strfilename
      End If
      Next
      End Function


      Function Singleprocessing()
      Dim Objfile
      Set Objfile = Objfso.Getfile(Strsource)
      Strfilename = Objfso.Getbasename(Objfile.Path)
      Wordinterface Objfile.Path,Strfilename
      End Function

      Function Wordinterface(Strfilename,Formattedfilename)
      Objword.Documents.Open Strfilename
      Set Objdoc = Objword.Activedocument
      ‘Stop
      ‘set The Title Of The Document To Match The Filename
      Objdoc.Builtindocumentproperties(1) = Formattedfilename
      ‘1 = Wdpropertytitle In Vba

      Objdoc.Saveas Strtarget & "\" & Formattedfilename & ".htm",8
      ‘objdoc.Saveas "C:\Doc2Html\" & Formattedfilename & ".htm",8
      On Error Resume Next
      Objdoc.Close
      End Function

      ‘stop
      Set Objfso = Createobject("Scripting.FileSystemObject")
      Set Objword = Createobject("Word.Application")
      Objword.Visible = False
      Call Getparams

      If Bbatch Then
      Call Batchprocessing
      Else
      Call Singleprocessing
      End If

      Objword.Quit
      Set Objword = Nothing


      <%
      ‘****人民幣大小寫轉(zhuǎn)換格式****
      dim str(9)
      str(0)="零"
      str(1)="壹"
      str(2)="貳"
      str(3)="叁"
      str(4)="肆"
      str(5)="伍"
      str(6)="陸"
      str(7)="柒"
      str(8)="捌"
      str(9)="玖"
      aa=Request.form("source")
      hh=formatnumber(aa,2,-1)
      aa=replace(hh,".","")
      aa=replace(aa,",","")
      for i=1 to len(aa)
      s=mid(aa,i,1)
      mynum=str(s)
      select case(len(aa)+1-i)
      case 1: k= mynum&"分"
      case 2: k= mynum&"角"
      case 3: k= mynum&"元"
      case 4: k= mynum&"拾"
      case 5: k= mynum&"佰"
      case 6: k= mynum&"仟"
      case 7: k= mynum&"萬"
      case 8: k= mynum&"拾"
      case 9: k= mynum&"佰"
      case 10: k= mynum&"仟"
      end select
      m=m&k
      next
      %>


      <html>
      <head>
      <title>數(shù)字轉(zhuǎn)換</title>
      <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
      </head>
      <!--
      Elseif(s=".") then
      n=m
      i=i+2
      for j=i to len(aa)
      s=mid(aa,i,1)
      mynum=str(s)
      select case(len(aa)+1-i)
      case 1: p= mynum&"分"
      case 2: p= mynum&"角"
      end select
      m=m&p
      next
      -->

      <body bgcolor="#FFFFFF">
      <form method="post" name="forma">
      <input type="text" name="source" value="<%=hh%>">
      =
      <input type="text" name="result" value="<%=m%>" size="40">

      <input type="submit" name="Submit" value="提交 " >
      </form>
      </body>
      </html>

      ‘獲取中文字符串拼音首字母串的函數(shù)
      <%
      response.write "<link href=style.css rel=stylesheet>"
      if request.form("content")="" then
      response.write "<center><form method=post action=""""><input name=content type=text>__<input type=submit></form>"
      else
      function getpychar(char)
      tmp=65536+asc(char)
      if(tmp>=45217 and tmp<=45252) then
      getpychar= "A"
      elseif(tmp>=45253 and tmp<=45760) then
      getpychar= "B"
      elseif(tmp>=45761 and tmp<=46317) then
      getpychar= "C"
      elseif(tmp>=46318 and tmp<=46825) then
      getpychar= "D"
      elseif(tmp>=46826 and tmp<=47009) then
      getpychar= "E"
      elseif(tmp>=47010 and tmp<=47296) then
      getpychar= "F"
      elseif(tmp>=47297 and tmp<=47613) then
      getpychar= "G"
      elseif(tmp>=47614 and tmp<=48118) then
      getpychar= "H"
      elseif(tmp>=48119 and tmp<=49061) then
      getpychar= "J"
      elseif(tmp>=49062 and tmp<=49323) then
      getpychar= "K"
      elseif(tmp>=49324 and tmp<=49895) then
      getpychar= "L"
      elseif(tmp>=49896 and tmp<=50370) then
      getpychar= "M"
      elseif(tmp>=50371 and tmp<=50613) then
      getpychar= "N"
      elseif(tmp>=50614 and tmp<=50621) then
      getpychar= "O"
      elseif(tmp>=50622 and tmp<=50905) then
      getpychar= "P"
      elseif(tmp>=50906 and tmp<=51386) then
      getpychar= "Q"
      elseif(tmp>=51387 and tmp<=51445) then
      getpychar= "R"
      elseif(tmp>=51446 and tmp<=52217) then
      getpychar= "S"
      elseif(tmp>=52218 and tmp<=52697) then
      getpychar= "T"
      elseif(tmp>=52698 and tmp<=52979) then
      getpychar= "W"
      elseif(tmp>=52980 and tmp<=53640) then
      getpychar= "X"
      elseif(tmp>=53689 and tmp<=54480) then
      getpychar= "Y"
      elseif(tmp>=54481 and tmp<=62289) then
      getpychar= "Z"
      else ‘如果不是中文,則不處理
      getpychar=char
      end if
      end function
      function getpy(str)
      for i=1 to len(str)
      getpy=getpy&getpychar(mid(str,i,1))
      next
      end function
      content=request.form("content")
      response.write "<center>"&getpy(content)&chr(10)
      response.write "<br/><br/><br/><a href=# onclick=javascript:history.go(-1)>返回</a>"
      end if
      %>


      --------------------------------------------
      ip限制函數(shù)
      ‘******************************
      ‘Function CheckIp(cInput_Ip,cBound_Ip)
      ‘Created by qqdao, qqdao@263.net 2001/11/28
      ‘說明:首先需要根據(jù);號循環(huán),然后判斷是否含有"-",如果有則進行拆分處理,最后判斷是否在范圍內(nèi)
      ‘參數(shù): cInput_Ip,代檢查的ip
      ‘ cBound_Ip,給定的范圍格式為,單個ip,和范圍ip,范圍ip最后使用"-"分割,如果是"*"則必須放到最后一位
      ‘ 每個范圍后添加":ALLOW"表示允許登陸,添加":REFUSE"表示拒絕登陸。多個范圍用";"隔開
      ‘ 例如192.168.1*.*:ALLOW;192.168.1.1:ALLOW;192.168.1.1-10:REFUSE"
      ‘返回值: true/false
      ‘更新:2001/12/05 支持ALLOW,REFUSE支持‘*‘,不想對?支持,因為和*差不多
      ‘******************************
      function CheckIp(cInput_Ip,cBound_Ip)
      dim cSingle_Ip,cTemp_IP,cStart_IP,cEnd_Ip
      CheckIp = false
      cSingle_Ip=split(cBound_Ip,";")

      for i=0 to ubound(cSingle_Ip)
      if Instr(cSingle_Ip(i),"REFUSE") <> 0 then ‘就是拒絕了
      cTemp_IP = left(cSingle_Ip(i),instr(cSingle_Ip(i),":")-1)

      if Instr(cTemp_IP,"*") <> 0 then ‘是寬范圍
      cStart_IP = left(cTemp_IP,instr(cTemp_IP,"*")-1)
      if left(cInput_Ip,len(cStart_IP))=cStart_IP then
      CheckIp = false
      exit function
      end if
      end if

      if Instr(cTemp_IP,"-") = 0 then
      cStart_IP = cTemp_IP
      cEnd_Ip = cTemp_IP
      else
      cStart_IP = left(cTemp_IP,instr(cTemp_IP,"-")-1)
      cEnd_Ip = left(cStart_IP,InStrRev(cStart_IP,".")-1)+"."+mid(cTemp_IP,instr(cTemp_IP,"-")+1)
      end if

      if Ip2Str(cInput_Ip)>=Ip2Str(cStart_IP) and Ip2Str(cInput_Ip)<=Ip2Str(cEnd_Ip) then
      CheckIp = false
      exit function
      end if

      elseif Instr(cSingle_Ip(i),"ALLOW") <> 0 then ‘允許

      cTemp_IP = left(cSingle_Ip(i),instr(cSingle_Ip(i),":")-1)

      if Instr(cTemp_IP,"*") <> 0 then ‘是寬范圍
      cStart_IP = left(cTemp_IP,instr(cTemp_IP,"*")-1)
      if left(cInput_Ip,len(cStart_IP))=cStart_IP then
      CheckIp = true
      end if
      end if

      if Instr(cTemp_IP,"-") = 0 then
      cStart_IP = cTemp_IP
      cEnd_Ip = cTemp_IP
      else
      cStart_IP = left(cTemp_IP,instr(cTemp_IP,"-")-1)
      cEnd_Ip = left(cStart_IP,InStrRev(cStart_IP,".")-1)+"."+mid(cTemp_IP,instr(cTemp_IP,"-")+1)
      end if

      if Ip2Str(cInput_Ip)>=Ip2Str(cStart_IP) and Ip2Str(cInput_Ip)<=Ip2Str(cEnd_Ip) then
      CheckIp =true
      else
      CheckIp =false
      end if
      end if
      next

      end function


      取當前網(wǎng)頁的地址全名,以便返回用
      <%
      Function GetUrl()
      On Error Resume Next
      Dim strTemp
      If LCase(Request.ServerVariables("HTTPS")) = "off" Then
      strTemp = "http://"
      Else
      strTemp = "https://"
      End If
      strTemp = strTemp & Request.ServerVariables("SERVER_NAME")
      If Request.ServerVariables("SERVER_PORT") <> 80 Then strTemp = strTemp & ":" & Request.ServerVariables("SERVER_PORT")
      strTemp = strTemp & Request.ServerVariables("URL")
      If Trim(Request.QueryString) <> "" Then strTemp = strTemp & "?" & Trim(Request.QueryString)
      GetUrl = strTemp
      End Function
      ‘Response.write GetUrl()
      url1=GetUrl()
      url1=Server.URLEncode(url1)

      %>

       

      上傳文件時,顯示進度條程序

      在需要引用進度條的也面上用
      <script language="javascript" src="../ShowProcessBar.js"></script>

      然后,
      <input type="submit" value="開始上傳" name="B1" IsShowProcessBar="True">
      傳參數(shù) true

      ShowProcessBar.js
      —————————————————————————————————————————
      AddProcessbar();
      var bwidth=0;
      var swidth = document.all.waiting.clientWidth;

      function CheckIsProcessBar(obj)
      {
      if (obj.IsShowProcessBar=="True")
      {
      return false;
      }
      else
      {
      return true;
      }
      }

      function CheckClick(e)
      {
      if (e == 1)
      {
      if (bwidth<swidth*0.98){
      bwidth += (swidth - bwidth) * 0.025;
      if (document.all)document.sbar.width = bwidth;
      else document.rating.clip.width = bwidth;
      setTimeout(‘CheckClick(1);‘,1000);

      }
      }
      else
      {
      if(document.all)
      {
      if(document.all.waiting.style.visibility == ‘visible‘)
      {document.all.waiting.style.visibility = ‘hidden‘;
      bwidth = 1;}
      whichIt = event.srcElement;

      while (CheckIsProcessBar(whichIt))
      {
      whichIt = whichIt.parentElement;
      if (whichIt == null)return true;
      }


      document.all.waiting.style.pixelTop = (document.body.offsetHeight - document.all.waiting.clientHeight) / 2 + document.body.scrollTop;
      document.all.waiting.style.pixelLeft = (document.body.offsetWidth - document.all.waiting.clientWidth) / 2 + document.body.scrollLeft;
      document.all.waiting.style.visibility = ‘visible‘;
      if(!bwidth)CheckClick(1);
      bwidth = 1;

      }

      else
      {

      if(document.waiting.visibility == ‘show‘)
      {document.waiting.visibility = ‘hide‘;
      document.rating.visibility = ‘hide‘;
      bwidth = 1;}
      if(e.target.href.toString() != ‘‘)
      {
      document.waiting.top = (window.innerHeight - document.waiting.clip.height) / 2 + self.pageYOffset;
      document.waiting.left = (window.innerWidth - document.waiting.clip.width) / 2 + self.pageXOffset;
      document.waiting.visibility = ‘show‘;
      document.rating.top = (window.innerHeight - document.waiting.clip.height) / 2 + self.pageYOffset+document.waiting.clip.height-10;
      document.rating.left = (window.innerWidth - document.waiting.clip.width) / 2 + self.pageXOffset;
      document.rating.visibility = ‘show‘;
      if(!bwidth)CheckClick(1);
      bwidth = 1;
      }
      }
      return true;
      }
      }

      function AddProcessbar()
      {

      var Str=""
      Str+= "<div id=waiting style=position:absolute;top:50px;left:100px;z-index:1;visibility:hidden >";
      Str+= "<layer name=waiting visibility=visible zIndex=2 >"
      Str+= "<table border=2 cellspacing=1 cellpadding=0 bordercolorlight=#FFFFFF bordercolordark=#C0C0C0 bgcolor=#E0E0E0>"
      Str+= " <tr>"
      Str+= " <td bgcolor=#E0E0E0 height=30px width=300px align=center>"
      Str+= " <font color=black>數(shù)據(jù)正在處理中...</font>"
      Str+= " </td>"
      Str+= " </tr>"
      Str+= " <tr>"
      Str+= " <td bgcolor=#E0E0E0>"
      Str+= " <img width=1 height=10 name=sbar style=background-color:#6699cc>"
      Str+= " </td>"
      Str+= " </tr>"
      Str+= "</table> "
      Str+= "</layer>"
      Str+= "</div>"
      document.write(Str)

      if(document.all)document.onclick = CheckClick;
      }


      控制滾動:
      =============

      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
      <title>無標題文檔</title>
      </head>

      <body style="margin:0px">
      <table width="110" border="0" align="center" cellpadding="2" cellspacing="0" height="300px">
      <tr>
      <td id="i">
      <marquee id="mar" direction="up" behavior="slide" height="100px" style="background-Color:#00ff00">
      <div style="background-Color:#ff0000" id="div">
      <p><a href="#">分類一</a></p>
      <p>分類二</p>
      <p>分類三</p>
      <p>分類四</p>
      <p>分類五</p>
      <p>分類六</p>
      </div>
      </marquee>
      <div id="div"></div>
      </td>
      </tr>
      <tr>
      <td>
      <input type="button" name="btnUp" value="向上" onMouseOver="UpScroll();" onMouseOut="StopScroll();">
      <input name="btnDown" type="button" value="向下" onMouseOver="DownScroll();" onMouseOut="StopScroll();">
      </td>
      </tr>
      </table>
      <script language="JavaScript">
      var timer;
      var mar = document.all.mar;
      var div = document.all.div;
      var h1 = div.offsetHeight;
      var h2 = mar.height;
      file://向上移動
      function UpMarquee(){
      if(mar.scrollTop>=h1)
      StopScroll();
      else
      mar.scrollTop+=1;
      }
      function DownMarquee(){
      if(mar.scrollTop<=h2)
      StopScroll();
      else
      mar.scrollTop-=1;
      file://alert(mar.scrollTop);
      }
      file://循環(huán)調(diào)用向下移動函數(shù)
      function UpScroll(){
      file://alert(mar.scrollTop);
      file://StopScroll();
      timer = setInterval(‘UpMarquee()‘,50);//循環(huán)調(diào)用
      }
      file://循環(huán)調(diào)用向上移動函數(shù)
      function DownScroll(){
      file://StopScroll();
      timer = setInterval(‘DownMarquee()‘,50);//循環(huán)調(diào)用
      }
      file://清除循環(huán)調(diào)用
      function StopScroll(){
      clearInterval(timer);
      }
      </script>
      </body>
      </html>

      =======================================================
      檢查時間:
      ================
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
      <title></title>
      <script language="JavaScript">
      function isValid(vlu)
      {
      var tmp1 = "";
      var i = 0;
      var bool = true;
      vlu += ":";
      i = vlu.indexOf(":");
      tmp = vlu.substr(0,i);
      vlu = vlu.substr(i+1,vlu.length);
      bool = isErr(tmp) & isErr1(tmp) & isErr2(tmp);
      i = vlu.indexOf(":");
      tmp = vlu.substr(0,i);
      vlu = vlu.substr(i+1,vlu.length);
      bool &= isErr(tmp) & isErr1(tmp) & isErr3(tmp);
      i = vlu.indexOf(":");
      tmp = vlu.substr(0,i);
      vlu = vlu.substr(i+1,vlu.length);
      bool &= isErr(tmp) & isErr1(tmp) & isErr3(tmp);
      if(bool == true)
      alert("ok.");
      else
      alert("The time is incorrect.");
      }
      function isErr(vlu)
      {
      var bool = vlu.indexOf("-") >= 0 ? false : true;
      bool &= vlu.indexOf(".") >= 0 ? false : true;
      return bool;
      }
      function isErr1(vlu)
      {
      return isNaN(parseInt(vlu)) ? false : true;
      }
      function isErr2(vlu)
      {
      return parseInt(vlu) > 23 ? false : true;
      }
      function isErr3(vlu)
      {
      return parseInt(vlu) > 59 ? false : true;
      }
      file://isValid("25:59:00");
      </script>
      </head>

      <body>
      <input name="txtTime" type="text" id="txtTime" value="09:05:59">
      <input type="button" name="Submit" value="°&acute;&Aring;&yen;" onClick="isValid(document.all.txtTime.value);">
      </body>
      </html>

        本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約