码迷,mamicode.com
首页 > Web开发 > 详细

js 字符串匹配

时间:2019-01-12 13:16:01      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:mat   match   w3c   write   字符串匹配   sch   bsp   type   code   

 

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>W3Cschool教程(w3cschool.cn)</title>
</head>
<body>

<script>
var str = "Visit W3Cschool";
var patt1 = /w3cschool/i;
document.write(str.match(patt1));
</script>

</body>
</html>

 

js 字符串匹配

标签:mat   match   w3c   write   字符串匹配   sch   bsp   type   code   

原文地址:https://www.cnblogs.com/sea-stream/p/10259136.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!