double myNumber;
myNumber.ToString("0.:#0").Replace(".", "");
Could someone tell me the equivalent jquery function?
Sorry not to good with jquery.
Thanks,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
jQuery is not necessary for this and actually doesn’t have number formatting methods (unless you use a plugin).
I would do it like this just using native JavaScript:
The
toFixed()method allows you to specify the number digits after the decimal place.