admin管理员组

文章数量:1313388

I have created a fairly large Javascript app that works in Firefox and up until yesterday, IE. I've made quite a few changes and now I'm getting syntax errors in IE, but all is fine in Firefox. Obviously I have a trailing ma somewhere but I can't see it. IE's error message is less than helpful, not even telling me which JS file has the error.

Is there a syntax checker for Javascript that will inform me of such errors in more detail?

I have created a fairly large Javascript app that works in Firefox and up until yesterday, IE. I've made quite a few changes and now I'm getting syntax errors in IE, but all is fine in Firefox. Obviously I have a trailing ma somewhere but I can't see it. IE's error message is less than helpful, not even telling me which JS file has the error.

Is there a syntax checker for Javascript that will inform me of such errors in more detail?

Share Improve this question asked Feb 17, 2009 at 23:33 Steve MSteve M 10.6k12 gold badges53 silver badges63 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 5

http://www.jslint./ will catch those ma and semicolon problems.

Example:

Error:
    Problem at line 1 character 17: Extra ma.

var foo = ['bar',]

    Problem at line 1 character 19: Missing semicolon.

var foo = ['bar',]

JS lint -> http://jslint./

I would try it in IE8rc1. The new debugging tools are a far cry from Firebug, but they should tell you exactly what the problem is in this case.

本文标签: debuggingJavascript syntax errors in IEStack Overflow