84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
怎么用正则获取div里style的left和top的39.73354231974922和94.35736677115987这两个值,不包括%
标签1
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
var s = ' ' + ' ' + '标签1 '; s.match(/\d+\.?\d+(?=%)/g); // ["39.73354231974922", "94.35736677115987"]
var reg = /style="left:([\d\.]+)[\s\S]+top:([\d\.]+)/; var matches = ' 标签1 '.match(reg); console.log('left: %s,top: %s',matches[1],matches[2])
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...