开发者

Changing date format using javascript

i am getting date in the format (YY/DD/MM) for ex 2010/12开发者_StackOverflow中文版/07 i want to change format to Monday 7 July, 2010 through javascript


Use the toLocaleDateString() method of the date object (it will be specific to the user's locale)

var d = new Date('2010/12/07');
alert(d.toLocaleDateString());
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜