javascript parse() method
Translation results:
UK[pɑ:z] US[pɑ:rs]
vt. Grammatically describe or analyze (words, sentences, etc.)
Third person singular: parses Present participle: parsing Past tense : parsed past participle: parsed
javascript parse() methodsyntax
Function: Parse a date and time string and return the number of milliseconds from midnight on 1970/1/1 to the date and time.
Syntax: Date.parse(datestring)
Parameters: datestring Required. A string representing the date and time.
Returns: The number of milliseconds between the specified date and time 1970/1/1 midnight (GMT time).
Description: This method is a static method of Date object. This method is generally called in the form of Date.parse() rather than through dateobject.parse().
Note: Date.parse() is a static method of Date object.
javascript parse() methodexample
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <script type="text/javascript"> //取得从 1970/01/01 到 2005/07/08 的毫秒数 var d = Date.parse("Jul 8, 2005") document.write(d) </script> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance