Warning: Attempt to read property "ID" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 471

Warning: Attempt to read property "display_name" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 480

Warning: Attempt to read property "display_name" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 487

Warning: Attempt to read property "description" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 489

Warning: Attempt to read property "ID" on bool in /www/wwwroot/129.28.78.18/wp-content/themes/storeys-pro/wbc/components/og_schema/wb_og_schema.php on line 493

9-15唐兆文

正则表达式g模式下的true/false交替

g模式下全局匹配字符,在全局模式下可以指定查找字符串进行多次匹配。每次匹配的lastindex属性值作为目标在字符串中查找的位置。lastindex的初值为0找到匹配项后 值被重置为匹配内容的下一个字符在字符串中的位置索引 用来标识下次执行匹配时开始查找的位置,如果找不到匹配的项lastIndex的值会被设置为0则为false。当没有设置正则对象的全局匹配标志时lastIndex属性的值始终为0,每次执行匹配仅查找字符串中第一个匹配的项。

面向对象

this:以函数的形式调用时,this永远都是window

​ 以方法调用的时候,this就是调用方法的那个对象

评论留言