How can I extract numeric part from value stored in another variable ?
For example:
var a=some_string ;
Now I want to extract numeric value of a and store it in another variable .
How can I extract numeric part from value stored in another variable ?
For example:
var a=some_string ;
Now I want to extract numeric value of a and store it in another variable .
Example--
var a='kjh56SS';
var b='';
for(var i=0;i<a.length;i++){
if(!isNaN(a.charAt(i))){
b=b+a.charAt(i);
}
}
alert(b);