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();
举一反三
- 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();