javascript - strip decimal points from variable -


ok know easy floundering.. have series of variables have decimal point , few zeros. how strip variable goes 1.000 1 ? dont think important numbers generated xml file grabbing jquery ...

var quantity = $("qty",this).text(); 

thanks in advance help!

simply...

math.round(quantity); 

...assuming want round 1.7 2. if not, use math.floor 1.7 1.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -