开发者

How to get the value of a number embedded in text using jQuery

I开发者_如何学JAVA need to find out the value of the numeric part from a string, where the string contains two parts, text and number. There is only one couple of such text. For example number01, data34 etc.


jQuery not needed:

var myString = 'data34';
var myNumber = myString.match(/\d+/);
alert(myNumber);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜