摘要:
1. 手机号码:const reg = /^1[3456789]\d{9}$/g; 2. 身份证号码: const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)|(^\d{14}(\d|X|x)$)/; 3. 邮箱: const reg = /^([ 阅读全文
摘要:
// 移除数组中元素 Array.prototype.remove = function(val) { var index = this.indexOf(val); if (index > -1) { this.splice(index, 1); } }; 阅读全文