Javascript Date.toString()方法
作者:--
发布时间:2019-11-20
评论:0
阅读:4
此方法返回表示指定日期对象的字符串。
语法
date.tostring()
下面是参数的详细信息:
返回值:
返回表示指定日期对象的字符串
例子:
<html>
<head>
<title>javascript tostring method</title>
</head>
<body>
<script type="text/javascript">
var dateobject = new date(1993, 6, 28, 14, 39, 7);
stringobj = dateobject.tostring();
document.write( "string object : " + stringobj );
</script>
</body>
</html>
这将产生以下结果:
string object : wed jul 28 14:39:07 utc+0530 1993