In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "what are the basic functions of JavaScript". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Time function Date
1 、 Date
In JavaScript, you use the Date () function to get the time.
Var date = new Date ()
2. Create a specified time object
You need to pass a string representing the time in the constructor as a parameter, the format of the date month / day / year: minutes: seconds
Var date2 = new Date ("11 Compact 2 Universe 20 21 18:15:00")
3. GetDate ()
Gets the number of days the current date object is.
4. GetDay ()
Gets the day of the week of the current date object and returns a value of 0-6. 0 means Sunday, 1 means Monday.
5. GetMonth ()
Gets the month of the current time object, 0 for January, 1 for February.
6. GetFullYear ()
Get year
7. GetTime ()
Gets the timestamp of the current date object.
Timestamp, which refers to the number of milliseconds spent from 00:00:00 GMT on January 1, 1970 to the current date (1 second = 1000 milliseconds), which is used by the underlying computer to save time.
8. Use timestamps to test the performance of code execution
Var start = Date.now ()
For (var iTunes 0; I
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.