• 2022-06-12
    Date对象问题4:Date对象正确获取年份的方法是:
    A: var now = new Date();var year = now.Year();
    B: var now = new Date();var year = now.getYear();
    C: var now = new Date();var year = now.getFullYear();
    D: var now = new Date();var year = now.getNowYear();
  • C

    内容

    • 0

      不属于原始类型的是() A: var b =ture; B: var s ="aa"; C: var d =new Date(); D: var n =123;

    • 1

      下面不是用于创建一个新的对象的语句是 A: var d = new Date(); B: var f = (); C: var o = new Object(); D: var o = {title: "hello", author: "Tom"};

    • 2

      如果要在网页上显示"20060816",空格处应填写的javascript代码是( )。var year = 2006;var month = 8;var date = 16;document.write(____);//此处填写代码 A: year+month+date B: year+0+month+date C: year+"0"+month+date D: year+""+month+""+date

    • 3

      已知var a = new Date(9/25/2010 18:36:42)_通过a.getMonth()获取的是()。

    • 4

      假设现在时间是2018-4-18 20:02:10 var mydate = new Date mydate.getMonth()的结果是