当前位置:网站首页>Day29 JS notes 2021.09.23
Day29 JS notes 2021.09.23
2022-06-28 11:30:00 【Little dream of becoming a big man】
Math Built-in objects :
- Math.PI PI
- Math.abs() The absolute value
- Math.max() Maximum
- Math.min() minimum value
- Math.ceil() Rounding up ( Ceiling function )
- Math.floor() Rounding down ( Floor functions )
- Math.round() rounding
- Math.random() random number (0~1)

If the element in the built-in object is a string :
- When the content of a string is a number Converts to numeric type by default
- When the content of the string is Chinese characters Returns the NaN(not a number)
Date object :Date function (GMT Standard time Greenwich / GMT 1970-1-1 00:00:00)
How it was created :new Date()
Acquisition time :

expand : Display the output results in the browser : structure .innerHTML = Output results
Setup time :

Time stamp : Converts the current time to milliseconds
1) Date object . getTime()

2) In the... Of the creation date object new Add one in front +

Formatting settings for dates :
1. Convert to date toLocaleDateString()
2. Convert to hours, minutes and seconds toLocaleTimeString()
3. Convert to month, day, hour, minute and second toLocaleString()

Conversion between bases :
tostring Method to convert a decimal number to another base

parseInt Method to convert other base digits to decimal ( The second parameter value defaults to 10 Base number )

边栏推荐
猜你喜欢

TiDB v6.0.0 (DMR) :缓存表初试丨TiDB Book Rush

day33 js笔记 事件(下)2021.09.28

day31 js笔记 DOM下 2021.09.26

JS foundation 3

Redis6 一:Nosql引入、Redis可以解决什么问题?

一套十万级TPS的IM综合消息系统的架构实践与思考

Summary of spatial temporal time series prediction modeling methods

Training notice | special training notice on epidemic prevention and security prevention for overseas Chinese funded enterprises, institutions and personnel in 2022

行业分析| 快对讲,楼宇对讲
![[practice] 1364- implement a perfect waterfall flow component on the mobile terminal (with source code)](/img/e8/21d8d81a3d7b544687d6adc06ad4b1.png)
[practice] 1364- implement a perfect waterfall flow component on the mobile terminal (with source code)
随机推荐
JS foundation 6
Graduated
如临现场的视觉感染力,NBA决赛直播还能这样看?
Redis6 一:Nosql引入、Redis可以解决什么问题?
New listing of operation light 3.0 - a sincere work of self subversion across the times!
Cannot redeclare block range variables
For example, the visual appeal of the live broadcast of NBA Finals can be seen like this?
Which broker is safer and more convenient to open an account for Oriental Fortune mobile stock?
day36 js笔记 ECMA6语法 2021.10.09
【SemiDrive源码分析】【X9芯片启动流程】32 - DisPlay模块分析 - RTOS侧
day33 js笔记 事件(下)2021.09.28
day29 js笔记 2021.09.23
个人买场内基金选择什么证券公司开户好,更安全
QML控件类型:TabBar
100 important knowledge points that SQL must master: retrieving data
Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system
阿里三面:LEFT JOIN关联表中用ON还是WHERE跟条件有什么区别
TiDB v6.0.0 (DMR) :缓存表初试丨TiDB Book Rush
day34 js笔记 正则表达式 2021.09.29
Making and using of dynamic library (shared library)