JavaScript Date.toGMTString()方法使用Internet GMT约定将日期转换为字符串。此方法不再使用,已由toUTCString方法替换。
Date.toGMTString()
使用网络GMT约定将日期返回到字符串。
链接:https://www.learnfk.comhttps://www.learnfk.com/javascript/date-togmtstring.html
来源:LearnFk无涯教程网
<html> <head> <title>JavaScript toGMTString Method</title> </head> <body> <script type="text/javascript"> var dt=new Date(1993, 6, 28, 14, 39, 7); document.write( "Formated Date : " + dt.toGMTString() ); </script> </body> </html>
运行上面代码输出
Formated Date : Wed, 28 Jul 1993 09:09:07 GMT
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)