📌  相关文章
📜  jquery 从字符串中提取数字 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:07.598000             🧑  作者: Mango

代码示例3
You can get it like this:

var suffix = 'comment_like_123456'.match(/\d+/); // 123456

With respect to button:

$('.comment_like').click(function(){
  var suffix = this.id.match(/\d+/); // 123456
});

It works for me.