get current time
1. First, you need to load the util.js file in the .js file that gets the current time
var util = require('../../utils/util.js');
2. We can see that the method of obtaining time has been written in the util.js file, just import it directly into the required .js file
3. Use the onLoad method to call the formatTime method in util.js
Among them, formatTime() needs to pass in the parameter new Data(),
so that the current time of the system can be obtained.
An important message is inserted here! ! !
If you like cold knowledge,
eager to explore the magical world, and
want to be an all-knowing academic master,
come and follow us.