Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

change px string to number

parseFloat('20.954544px', 10)
> 20.954544
parseInt('20.954544px', 10)
> 20
a = '20px'
parseInt(a, 10);
> 20
 
PREVIOUS NEXT
Tagged: #change #px #string #number
ADD COMMENT
Topic
Name
1+8 =