早教吧作业答案频道 -->其他-->
javascript显示当前日期和时间及星期几,格式如下“TodayisFriday,October23,2009.”
题目详情
javascript 显示当前日期和时间及星期几,格式如下“Today is Friday,October 23,2009.”
▼优质解答
答案和解析
无标题文档
var d=new Date();
function a(num){
switch(num){
case 0:return "January";break;
case 1:return "February";break;
case 2:return "March";break;
case 3:return "April";break;
case 4:return "May";break;
case 5:return "June";break;
case 6:return "July";break;
case 7:return "August";break;
case 8:return "September";break;
case 9:return "Octorber";break;
case 10:return "November";break;
case 11:return "December";break;
}
}
function b(num){
switch(num){
case 0:return "Sunday";break;
case 1:return "Monday";break;
case 2:return "Tuesday";break;
case 3:return "Wenseday";break;
case 4:return "Thursday";break;
case 5:return "Friday";break;
case 6:return "Saturday";break;
}
}
document.write("Today is "+b(d.getDay())+","+a(d.getMonth())+" "+d.getDate()+","+d.getFullYear());
无标题文档
var d=new Date();
function a(num){
switch(num){
case 0:return "January";break;
case 1:return "February";break;
case 2:return "March";break;
case 3:return "April";break;
case 4:return "May";break;
case 5:return "June";break;
case 6:return "July";break;
case 7:return "August";break;
case 8:return "September";break;
case 9:return "Octorber";break;
case 10:return "November";break;
case 11:return "December";break;
}
}
function b(num){
switch(num){
case 0:return "Sunday";break;
case 1:return "Monday";break;
case 2:return "Tuesday";break;
case 3:return "Wenseday";break;
case 4:return "Thursday";break;
case 5:return "Friday";break;
case 6:return "Saturday";break;
}
}
document.write("Today is "+b(d.getDay())+","+a(d.getMonth())+" "+d.getDate()+","+d.getFullYear());
看了 javascript显示当前...的网友还看了以下:
数据结构问题设有三对角矩阵(ai,j)nxn,将其三条对角线上的元素逐行地存于数组B[3n-2]中 2020-05-14 …
客轮可以用两种方式通过三峡大坝。(1)方式一,让客轮逐级通过五级梯级船闸:如图所示,当下游客轮进入 2020-07-06 …
123456789101112131415.设aij(i和j是下标)表示这个数位于这个从上往下的第 2020-07-29 …
boy表示B、dog表示D、Jack表示J.其他字母对应哪些单词呢?很多美剧战争片中经常出现报密码的 2020-11-07 …
如图所示,当下水管道被堵住之后,人们常常把一根细管的一端插入管道内,向另一端注水,不一会儿就把堵塞物 2020-11-10 …
设有三对角矩阵(Aij)n×n,将其三对角线上元素逐行存于数组B[1..m]中,使B[k]=Aij求 2020-11-10 …
(2010•湘潭)客轮可以用两种方式通过三峡大坝.(1)方式一,让客轮逐级通过五级梯级船闸:如图所示 2020-11-12 …
材料一:自古以来,中国就不乏“凿壁借光”“囊萤映雪”之类的读书故事和“开卷有益”的社会共识。但曾几何 2020-11-20 …
阅读图文材料,回答下列问题.(w)说出图中太行山脉的j理意义.(他)分析黄河对图示j区j表形态的塑造 2020-11-21 …
正游戏名称——"猜"扑克牌游戏规则1.拿一副扑克牌,去掉"大王"和"小王",使用剩下的52张牌.在游 2020-12-01 …