编辑下面的代码:【加编码】
<html> <body> <script> var str = "Visit ZiQiangXueTang"; var patt1 = /ZiQiang/g; if(patt1.global) { document.write("g modifier is set!"); } else { document.write("g modifier is not set!"); } </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂