当前位置:网站首页>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
}
边栏推荐
- 3D vision - 2 Introduction to pose estimation - openpose includes installation, compilation and use (single frame, real-time video)
- Why are grass-roots colleges and universities with "soil and poverty" called "Northeast small Tsinghua"?
- Qt学习25 布局管理器(四)
- Use vscode to view hex or UTF-8 codes
- Metal organic framework MOFs loaded with non steroidal anti-inflammatory drugs | zif-8 wrapped Prussian blue loaded quercetin (preparation method)
- Failure of vector insertion element iterator in STL
- Go language unit test 3: go language uses gocovey library to do unit test
- Mysql:insert date:SQL 错误 [1292] [22001]: Data truncation: Incorrect date value:
- Uniapp tips - scrolling components
- Conversion function and explicit
猜你喜欢
UiO-66-COOH装载苯达莫司汀|羟基磷灰石( HA) 包裹MIL-53(Fe)纳米粒子|装载黄芩苷锰基金属有机骨架材料
FPGA测试方法以Mentor工具为例
消息订阅与发布
SQL Injection (AJAX/JSON/jQuery)
[développement technologique - 24]: caractéristiques des technologies de communication Internet des objets existantes
解决MySql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES)
[email "/>
Doxorubicin loaded on metal organic framework MIL-88 DOX | folic acid modified uio-66-nh2 doxorubicin loaded [email
Using registered classes to realize specific type matching function template
Why are grass-roots colleges and universities with "soil and poverty" called "Northeast small Tsinghua"?
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
随机推荐
Collection of mobile adaptation related articles
Go 1.16.4: manage third-party libraries with Mod
[技术发展-24]:现有物联网通信技术特点
Cross linked cyclodextrin metal organic framework loaded methotrexate slow-release particles | metal organic porous material uio-66 loaded with flavonoid glycosides | Qiyue
Ocean CMS vulnerability - search php
交联环糊精金属有机骨架负载甲氨蝶呤缓释微粒|金属-有机多孔材料UiO-66负载黄酮苷类药物|齐岳
Message subscription and publishing
Using registered classes to realize specific type matching function template
How to delete an attribute or method of an object
Programmable logic device software testing
The small project (servlet+jsp+mysql+el+jstl) completes a servlet with login function, with the operation of adding, deleting, modifying and querying. Realize login authentication, prevent illegal log
JVM object lifecycle
Metal organic framework (MOFs) antitumor drug carrier | pcn-223 loaded with metronidazole | uio-66 loaded with ciprofloxacin hydrochloride(
JVM runtime data area
Software testing is so hard to find, only outsourcing offers, should I go?
jvm-运行时数据区
MySQL 数据处理值增删改
How to use lxml to judge whether the website announcement is updated
Metal organic framework MOFs loaded with non steroidal anti-inflammatory drugs | zif-8 wrapped Prussian blue loaded quercetin (preparation method)
Field problems in MySQL