开发者

Aptana shows syntax errors with JSON data declaration?

I am using Aptana 3, and it is giving a little red cross saying there is a syntax error when I have this in a .html file.

    <script>
    var data = [
            {'name':'Name1', 'email':'a@email.com'}]
    </script>

I don't have problem running the script, and Dreamweaver doesn't throw an error.

What's wrong?

UPDATE: If I save it as a .js and remove the tag, the warning goes away. But what not in html开发者_Go百科

Aptana shows syntax errors with JSON data declaration?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜