当前位置:网站首页>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 )

边栏推荐
- windows 10下载安装mysql5.7
- QML控件类型:TabBar
- String & heap & method area
- 远程登录sshd服务
- Everyone can participate in open source! Here comes the most important developer activity in dragon lizard community
- js中的class类模式及语法 2021.11.10
- Join hands with cigent: group alliance introduces advanced network security protection features for SSD master firmware
- GCC简介
- Class pattern and syntax in JS 2021.11.10
- Splicing strings in the string collection_ Stream based
猜你喜欢
随机推荐
vsftpd服务的部署及优化
setInterval、setTimeout和requestAnimationFrame
Day39 prototype chain and page Fireworks Effect 2021.10.13
day33 js笔记 事件(下)2021.09.28
Web page tips this site is unsafe solution
Tidb v6.0.0 (DMR): initial test of cache table - tidb Book rush
mysql-.sql文件钓鱼上线
毕业了
QML control type: tabbar
day32 js笔记 事件(上)2021.09.27
2022中国信通院首届业务与应用安全发展论坛成功召开!
Machine learning project captcha based on verification code recognition_ Trainer operation practice
It is safer for individuals to choose which securities company to open an account for buying floor funds
[sciter]: how sciter uses i18 to realize multi language switching of desktop applications and its advantages and disadvantages
Docker modifies the user name and password of MySQL
基于验证码识别的机器学习项目captcha_trainer操作实践
day23 js笔记 2021.09.14
关于Pytorch中双向LSTM的输出表示问题
Which broker is safer and more convenient to open an account for Oriental Fortune mobile stock?
Makefile简介









