Notice: Undefined variable: bid in /home/wwwroot/cczh004/wwwroot/public/class.php on line 3
搜索列表
-
看到一个JS正则的题
【正则表达式】贴出来与大家共勉。 先看一段代码, <script> var objReg = /^[a-zA-Z]{1}(:){1}$/gi; alert(objReg.test("a:"));//返回true alert(objReg.test("a:"));//返回false </script> 为什么第二个test会返回false?是不是觉得奇怪。 原因我解答如下: test实际上与exec方法的执行方法是一致的,...
看到一个JS正则的题