zoukankan      html  css  js  c++  java
  • js内置对象的常用方法

    Date对象:

    设置日期:

    new Date("month dd,yyyy hh:mm:ss");
    new Date("month dd,yyyy");
    new Date(yyyy,mth,dd,hh,mm,ss);
    new Date(yyyy,mth,dd);
    new Date(ms);

    创建日期对象--------------new Date();

    一个月的某一天 ----------getDate()     1-31

    一周的某一天--------------getDay()      0-6    实际日期要加1

    一年的某个月--------------getMonth()   0-11  实际日期要加1

    小时数------------------------getHours()

    分钟----------------------------getMinutes()

    秒--------------------------------getSeconds()

    获取原始值--------------------------valueOf()

    设置原始值---------------------------getTime()

  • 相关阅读:
    设计模式
    工厂方法模式
    简单工厂模式
    tornado自定义Form组件
    tornado
    Tornado框架的知识系列
    Linux基本命令
    day2
    day1
    使用cp复制文件夹却不能打开
  • 原文地址:https://www.cnblogs.com/cui-ting/p/11245937.html
Copyright © 2011-2022 走看看