javascript - Keep point when converting to float -


i sending numerical data server ajax call, 0.77, 100 , on. when server receives data, interprets 0.77 double, 100 int lacks decimals. number use

var nbr = parsefloat(stringvariable, 10); 

and if try input 100.0 remove decimals parsefloat removes them.

is there way keep decimal places server can distinguish data types?

there no numeric types other number in javascript. in order preserve decimals you're asking, you'd have send them string.


Comments

Popular posts from this blog

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

yii2 - Yii 2 Running a Cron in the basic template -

mercurial graft feature, can it copy? -