<html> <body> <script type="text/javascript"> var str = "Java Scripting is great!" document.write(str.match("great")) </script> <p>This example tests if a string contains a specified word. If the word is found it returns the word.</p> </body> </html>
Edit the text above, and click on the button to see the result.
Copyright © 2007-2008, Www.JavaBasics.We.Bs All rights reserved.