RegExp实例方法3

2017-06-15 19:04:00
admin
原创
486
<!DOCTYPE html>
<html>
<head>
    <title>RegExp test() Example</title>
    <script type="text/javascript">
        var text = "cat, bat, sat, fat";        
        var pattern = /.at/;
        
        if (pattern.test(text)){
            alert("The pattern was matched.");
        }

    </script>
</head>
<body>

</body>
</html>
  • QQ讨论群
  • 关注微信
    • 欢迎咨询
    • 欢迎加入QQ群 16506021
  • 公众号:源宝网络