$("#main").animate({
display: "block",
width: "70%",
opacity: 0.4,
marginLeft: "0.6in",
fontSize: "3em",
borderWidth: "10px"
} 1500);

这是jQuery。我收到“缺少参数列表之后的”消息。怎么了?

最佳答案



} 1500);


1500年之前缺少逗号

我将来可以建议使用http://www.jslint.com/吗?如果在该代码块中粘贴该代码块,则会出现以下错误:

Error:
Problem at line 8 character 3: Expected ')' and instead saw '1500'.

} 1500);

Problem at line 8 character 7: Missing semicolon.

} 1500);

Problem at line 8 character 7: Expected an identifier and instead saw ')'.

} 1500);

Problem at line 8 character 7: Stopping, unable to continue. (100% scanned).

Implied global: $ 1


之后,很容易看到您的错误必须在第8行。

10-08 19:42