更新时间:2022-01-25 06:52:17
You can use javascript's toFixed
method (source), you don't need jQuery. Example:
var number = 258.2;
var rounded = number.toFixed(2); // rounded = 258.20
电动工具箱"链接已屈服于linkrot并阻止了Wayback Machine,因此该源没有可用的URL.
Electric Toolbox link has succumbed to linkrot and blocks the Wayback Machine so there is no working URL for the source.