18
Use indexOf. It returns an integer showing the position of a substring, or -1 if it isn't found.
For example:
var test="myfile.doc"
if (test.indexOf('.')) {alert("Period found!";}
else {alert("Period not found. Sorry!";}