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
Post a Comment