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

边栏推荐
- 拼接String集合中的字符串_基于Stream
- 近况
- 合约量化交易系统开发 | 合约量化APP开发(现成案例)
- JS基础5
- Characteristics of solar wireless LED display
- Thesis reading (59):keyword based diverse image retrieval with variable multiple instance graph
- JS foundation 4
- 动态库(共享库)的制作和使用
- Fancy features and cheap prices! What is the true strength of Changan's new SUV?
- Recommended practice sharing of Zhilian recruitment based on Nebula graph
猜你喜欢

day34 js笔记 正则表达式 2021.09.29

vsftpd服务的部署及优化

动态库(共享库)的制作和使用

day31 js笔记 DOM下 2021.09.26

利用soapUI获取freemarker的ftl文件模板

Class pattern and syntax in JS 2021.11.10

day29 js笔记 2021.09.23

Oracle 日期格式化异常:无效数字

Join hands with cigent: group alliance introduces advanced network security protection features for SSD master firmware

Blue Bridge Cup Maze (dfs+ backtracking)
随机推荐
How to distinguish and define DQL, DML, DDL and DCL in SQL
setInterval、setTimeout和requestAnimationFrame
科研丨Web of Science检索技巧
Solve the problem of reading package listsdonebuilding dependency treereading state informationdone
基于验证码识别的机器学习项目captcha_trainer操作实践
String & heap & method area
Join hands with cigent: group alliance introduces advanced network security protection features for SSD master firmware
QML控件类型:TabBar
JS基础4
Zero foundation self-study SQL course | if function
JS foundation 3
Secretary of the Ukrainian national security and National Defense Commission: will carry out precision strikes against targets in Russia
SQL必需掌握的100个重要知识点:检索数据
Apache2配置对目录拒绝访问,但是可以访问里面文件的设置
Word、PDF、TXT文件实现全文内容检索需要用什么方法?
JS基础1-JS引入与运算符
ProCAST有限元铸造工艺模拟软件
JS foundation 1-js introduction and operator
js中的数组方法 2021.09.18
day32 js笔记 事件(上)2021.09.27