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();
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
举一反三
- Date对象问题3:能获得当前日期的是: A: var now = Date.now(); B: var now = new Date(); C: var now = new Date(now); D: var now = Now();
- 关于创建日期类下列说法正确的是( ) A: var now:Date = new Date(); B: var now:timer = new Timer (); C: var now: date = new date(); D: var now:timer = new Timer ();
- 下面的()语句可以取回当前的年份? A: now( ) B: date(now() ) C: time( ) D: year(now())
- 能返回当前系统年份的表达式为______。 A: Date( ) B: Month(Date( )) C: Year(Now( )) D: Year( )
- JavaScript中,产生当前日期的方法是( )。 A: Now(); B: Date(); C: new Date(); D: new Now();
内容
- 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()的结果是