The JS format currency retains the decimal and removes the 0 after the decimal.

for example, 0.00040000 needs to be converted to 0.0004
. It can be formatted normally with parseFloat, but if it encounters 0.00000007 like this, it will display scientific operations.
is there any way to prevent him from displaying scientific computing and formatting it

Mar.30,2021

is converted to a string for processing


use regular matching

var str = '0.000000000700'
var result = str.match(/.*[1-9]/)[0] // 0.0000000007
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5478e-452a6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5478e-452a6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?