当前位置:网站首页>JS input number and standard digit number are compared. The problem of adding 0 to 0
JS input number and standard digit number are compared. The problem of adding 0 to 0
2022-07-03 14:06:00 【Cupid510】

function name(a, b) {
if (a.indexOf(".") == -1 && b.indexOf(".") == -1) return a
let c = ""
a = a.indexOf(".") > -1 ? a : a.padEnd(a.length + 1, '.0')
c = a.replace(/(0+)$/g, "").padEnd(b.length, '0')
return c
}
边栏推荐
- selenium 浏览器(1)
- 如何使用lxml判断网站公告是否更新
- MySQL data processing value addition, deletion and modification
- How to delete an attribute or method of an object
- Implementation of Muduo accept connection, disconnection and sending data
- Qt学习23 布局管理器(二)
- Qt学习19 Qt 中的标准对话框(上)
- GoLand 2021.2 configure go (go1.17.6)
- PHP maze game
- Go language web development series 28: solve cross domain access of CORS with gin contrib / CORS
猜你喜欢

GoLand 2021.1: rename the go project

MySQL 数据处理值增删改

Redis:字符串类型数据的操作命令

MySQL 数据增删改查综合案例

QT learning 20 standard dialog box in QT (middle)
![Mysql:insert date:SQL 错误 [1292] [22001]: Data truncation: Incorrect date value:](/img/2f/33504391a661ecb63d42d75acf3a37.png)
Mysql:insert date:SQL 错误 [1292] [22001]: Data truncation: Incorrect date value:

Scroll detection of the navigation bar enables the navigation bar to slide and fix with no content
![[技术发展-24]:现有物联网通信技术特点](/img/f3/a219fe8e7438b8974d2226b4c3d4a4.png)
[技术发展-24]:现有物联网通信技术特点
![[机缘参悟-37]:人感官系统的结构决定了人类是以自我为中心](/img/06/b71b505c7072d540955fda6da1dc1b.jpg)
[机缘参悟-37]:人感官系统的结构决定了人类是以自我为中心

QT learning 17 dialog box and its types
随机推荐
Richview trvstyle liststyle list style (bullet number)
How to use lxml to judge whether the website announcement is updated
Depth and breadth first traversal of tree (regardless of binary tree)
SQL Injection (AJAX/JSON/jQuery)
Unable to stop it, domestic chips have made another breakthrough, and some links have reached 4nm
[how to earn a million passive income]
[ACNOI2022]猜数
Vite project commissioning
Golang - command line tool Cobra
Qt学习18 登录对话框实例分析
Qt学习23 布局管理器(二)
全局事件总线
Go language web development series 30: gin: grouping by version for routing
Redis:Redis的数据结构、key的操作命令
QT learning 25 layout manager (4)
Redis:字符串类型数据的操作命令
PHP maze game
Leetcode-1175. Prime Arrangements
核酸修饰的金属有机框架药物载体|PCN-223金属有机骨架包载Ad金刚烷|ZIF-8包裹阿霉素(DOX)
selenium 浏览器(1)