I have an element in javascript like follows:
280ms
I want to extract 280 from the span element. How can I do it?
Try the following
var strValue = // get 280m from the span var intValue = parseInt(strValue.match(/[0-9]+/)[0], 10);