var re = new RegExp("\d");
var common1DCount = $('#common1DCount').html().match(/\d+/);
var other1DCount = $('#other1DCount').html().match(/\d+/);
var oneDegree = common1DCount*1+other1DCount*1;
×1是为了将其转化为数字,不然将变成字符串的链接(在js中“+”表是连接的意思);
var re = new RegExp("\d");
var common1DCount = $('#common1DCount').html().match(/\d+/);
var other1DCount = $('#other1DCount').html().match(/\d+/);
var oneDegree = common1DCount*1+other1DCount*1;
×1是为了将其转化为数字,不然将变成字符串的链接(在js中“+”表是连接的意思);