2022年1月14日

如何用js把字符串中的字母和数字拆分开?

摘要: var num = "abc123456"; var r=num.match(/^[a-z|A-Z]+/gi); document.write(r+"<br/>"); r=num.match(/\d+$/gi); document.write(r); 输出 abc 123456 '60ms' 拆分 阅读全文

posted @ 2022-01-14 17:17 左侧岚 阅读(3509) 评论(0) 推荐(0) 编辑

导航