Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
151
rated 0 times [  157] [ 6]  / answers: 1 / hits: 78063  / 14 Years ago, tue, february 1, 2011, 12:00:00

Whats a simple way to delete the last two characters of a string?


More From » string

 Answers
15

To convert 245px in 245 just run:



parseInt('245px', 10);


It retains only leading numbers and discards all the rest.


[#93958] Sunday, January 30, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jessie

Total Points: 713
Total Questions: 87
Total Answers: 109

Location: Australia
Member since Sat, May 27, 2023
1 Year ago
;