Answers for "how to get number from string in jquery"

0

jquery extract number from string

var id_of_div = "div_id_12";
var id_number = parseInt(id_of_div.replace(/[^0-9.]/g, ""));
console.log(id_number);//12
Posted by: Guest on July-15-2020

Code answers related to "how to get number from string in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language