JSHint can be used to check JavaScript in HTML and xHTML files.