• <sub id="h4knl"><ol id="h4knl"></ol></sub>
    <sup id="h4knl"></sup>
      <sub id="h4knl"></sub>

      <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
      1. <strong id="h4knl"></strong>

      2. 怎么使用Javascript獲取距今n天前的日期

        時間:2024-07-22 13:19:55 JavaScript 我要投稿
        • 相關(guān)推薦

        怎么使用Javascript獲取距今n天前的日期

          復(fù)制代碼 代碼如下:

          function Test(day) {

          var today = new Date();

          var beforMilliseconds = today.getTime() - 1000 * 3600 * 24 * day;

          var beforday = new Date();

          beforday.setTime(beforMilliseconds);

          var strYear = beforday.getFullYear();

          var strDay = beforday.getDate();

          var strMonth = beforday.getMonth() + 1;

          if (strMonth < 10) {

          strMonth = "0" + strMonth;

          }

          var strYesterday = strYear + "-" + strMonth + "-" + strDay;

          alert(strYesterday);

          }

        【怎么使用Javascript獲取距今n天前的日期】相關(guān)文章:

        JavaScript日期時間格式化函數(shù)08-29

        使用ajax操作JavaScript對象的方法09-28

        詳解JavaScript中的splice()使用方法08-20

        javascript中for/in循環(huán)以及常見的使用技巧06-24

        javascript的閉包概念怎么理解06-15

        Javascript中arguments對象的詳解和使用方法08-20

        關(guān)于javascript對象之內(nèi)置和對象Math的使用方法10-08

        對javascript的理解08-08

        妝前乳的正確使用方法07-21

        在线咨询
        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码
      3. <sub id="h4knl"><ol id="h4knl"></ol></sub>
        <sup id="h4knl"></sup>
          <sub id="h4knl"></sub>

          <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
          1. <strong id="h4knl"></strong>

          2. 页面升级亚洲综合久久 | 久久婷婷综合一区二区 | 亚洲欧美日韩在线观看 | 右手影院亚洲一区二区 | 日韩AV中文在线播放 | 亚洲国产精品sss在线观看AV |

            怎么使用Javascript獲取距今n天前的日期

              復(fù)制代碼 代碼如下:

              function Test(day) {

              var today = new Date();

              var beforMilliseconds = today.getTime() - 1000 * 3600 * 24 * day;

              var beforday = new Date();

              beforday.setTime(beforMilliseconds);

              var strYear = beforday.getFullYear();

              var strDay = beforday.getDate();

              var strMonth = beforday.getMonth() + 1;

              if (strMonth < 10) {

              strMonth = "0" + strMonth;

              }

              var strYesterday = strYear + "-" + strMonth + "-" + strDay;

              alert(strYesterday);

              }