欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

          JS 正則 時間驗證

          復(fù)制代碼 代碼如下:
          function CheckTime()
          {
          var checkValue = new RegExp (“^[0-2]{1}[0-6]{1}:[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}”) ;
          var stControl = document.getElementById(“txtStartTime”) ;
          var stValue = stControl.value ;
          if (stValue == “”)
          {
          alert(“請?zhí)顚戦_始時間”) ;
          return false ;
          }
          if (!(checkValue.test(stValue)))
          {
          alert(“請?zhí)顚懝緝?nèi)部規(guī)定時間”) ;
          return false ;
          }
          var etControl = document.getElementById(“txtEndTime”) ;
          var etValue = etControl.value ;
          if (etValue == “”)
          {
          alert(“請?zhí)顚懡Y(jié)束時間”) ;
          return false ;
          }
          if (!(checkValue.test(etValue)))
          {
          alert(“請?zhí)顚懝緝?nèi)部規(guī)定時間”) ;
          return false ;
          }
          return true ;
          }
          贊(0)
          分享到: 更多 (0)
          網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號