我正在尝试在我的 javascript 文件上使用 google 闭包编译器。除了以下代码之外,它工作正常:
function goto(form) { var index=form.select.selectedIndex
if (form.select.options[index].value != "0") {
location=form.select.options[index].value;}}
编译器返回:
JSC_PARSE_ERROR:解析错误。缺少(在函数参数之前。在第 1 行字符 9 函数 goto(form) { var index=form.select.selectedIndex
当它在屏幕上输出时,有一个插入符号 (^) 指向“goto”中的 g。
我在这里只使用基本的 UI 版本进行测试:
http://closure-compiler.appspot.com/home
知道 javacript 有什么问题吗?它似乎工作得很好,但我不是 javascript 人,所以我不知道如何修复它。谢谢,
账单