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

边栏推荐
- Analyze whether there is duplicate data in the list and repeat it several times
- day34 js笔记 正则表达式 2021.09.29
- day39 原型链及页面烟花效果 2021.10.13
- Which broker is safer and more convenient to open an account for Oriental Fortune mobile stock?
- 东方财富手机股票开户哪个券商更安全更方便?
- Redis6 一:Nosql引入、Redis可以解决什么问题?
- 基于验证码识别的机器学习项目captcha_trainer操作实践
- Makefile简介
- Secretary of the Ukrainian national security and National Defense Commission: will carry out precision strikes against targets in Russia
- SQL必需掌握的100个重要知识点:检索数据
猜你喜欢

String & heap & method area

Recommended practice sharing of Zhilian recruitment based on Nebula graph

太阳能无线LED显示屏的特点

day30 js笔记 BOM和DOM 2021.09.24

day32 js笔记 事件(上)2021.09.27

Redis6 1: what problems can be solved by the introduction of NoSQL and redis?

day39 原型链及页面烟花效果 2021.10.13

Unity screenshot function

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

day36 js笔记 ECMA6语法 2021.10.09
随机推荐
How to distinguish and define DQL, DML, DDL and DCL in SQL
[practice] 1364- implement a perfect waterfall flow component on the mobile terminal (with source code)
Secretary of the Ukrainian national security and National Defense Commission: will carry out precision strikes against targets in Russia
GCC简介
Jetpack Compose Desktop 桌面版本的打包和发布应用
Mysql安装配置以及解决重装Mysql时忘记root password问题
Solve the problem of reading package listsdonebuilding dependency treereading state informationdone
元宇宙系统的发展与原理介绍
Create ECS using API shortcut
功能真花哨,价格真便宜!长安全新SUV真实力到底怎样?
Basic 02: variable, remember the mobile number of the object
Gee: mcd64a1 based globfire daily fire data set
Calculate time using calendar
Is it safe to buy stocks and open an account on the account QR code of the CICC securities manager? Ask the great God for help
阿里三面:LEFT JOIN关联表中用ON还是WHERE跟条件有什么区别
智联招聘基于 Nebula Graph 的推荐实践分享
行业分析| 快对讲,楼宇对讲
Makefile introduction
Everyone can participate in open source! Here comes the most important developer activity in dragon lizard community
基于验证码识别的机器学习项目captcha_trainer操作实践