laravel - ajax returns decimal display problem
PHP中文网
PHP中文网 2017-05-16 16:49:33
0
2
626

The ajax request returned a decimal number. The preview tag in the browser debugging tool is like this:

The two decimal places shown above are the same as the database settings, but after consolelog(), there is no decimal point after:

There is no decimal point when displayed in html. How can I prevent it from omitting the decimal point?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
给我你的怀抱

Either return a string or .toFixed(2) something

漂亮男人

Then ajax returns 100 of the string

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!