g
بازگشت به صفحه اصلی
بازگشت به صفحه مقاله
دو ستونی
دو سطری
اجرای کد RUN »
<!DOCTYPE html> <html> <body> <p>Click the button to do a global search for "is" in a string.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var str = "Is this all there is?"; var patt1 = /is/g; var result = str.match(patt1); document.getElementById("demo").innerHTML = result; } </script> </body> </html>