源代码:
下载代码
点击运行
<!DOCTYPE html> <html> <body> <script> var str="Visit RUNOOB"; var patt1=/RUN/g; document.write("The text of the RegExp is: "+patt1.source); </script> </body> </html>
运行结果: