54
rated 0 times
[
61]
[
7]
/ answers: 1 / hits: 59979
/ 13 Years ago, fri, june 10, 2011, 12:00:00
id = '01d0';
document.write('<br/>'+id.substr(0,-2));
How can I take a string like '01d0and get the
01` (all except the last two chars)?
In PHP I would use substr(0,-2)
but this doesn't seem to work in JavaScript.
How can I make this work?
More From » string