date.tostring()
下面是参数的详细信息:
- na
返回值:
返回表示指定日期对象的字符串
例子:
<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