如果要在网页上显示"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
A: year+month+date
B: year+0+month+date
C: year+"0"+month+date
D: year+""+month+""+date
举一反三
- 【单选题】如果要在网页上显示”20060816”,空格处因该填写的JavaScript代码是(选一项)[br][/br]var year = 2006;[br][/br]var month = 8;[br][/br]var date = 16;[br][/br]document.write( ________ );此处填写代码 A: year+month+date B: year+0+month+date C: year+"0"+month+date D: year+" "+month+" "+date
- “学生表”中有“出生日期”字段,则计算年龄的表达式为=( )。 A: Month(date())-Year([出生日期]) B: date()-[出生日期] C: Year(date())-Year([出生日期]) D: Month(date())-Month([出生日期])
- It is usually to show the date in the order of day/month/year (American practice), or month/day/year (British practice).
- 有以下程序: Class Date { public: Date(int y,int m,mt d); { year=y; month=m; day=d; } Date(int y=2000) { year=y; month=10; day=1; } Date(Date &D) { year=d.year; month=d.month; day=d.day; } Void prin A: 2 B: 3 C: 4 D: 5
- 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();