<html> <head> <title>Finding a substring within a string</title> <script type="text/javascript"> var a = "This is a test."; var b = a.indexOf("is"); document.write(b); </script> </head> <body> </body> </html>