-
javascript help needed
I want to put comma in currency value.
Example: Here is the input and expected output
input
1234
output
1,234
input
1234567
output
1,234,567
input
123373.3333
output
123,373.33
I'm using
valuestring=valuestring.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
but this code does not format 123373.3333=>123,373.33
How do I fix it ?
-
var str=1234
str.replace(`12`,1,2)
mjwebsoltuions:http://www.themjwebsolutions.com/
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks