【发布时间】:2013-04-02 03:20:08
【问题描述】:
我收到此错误,但我在发布前检查了所有括号 20 次。会不会有别的问题?谢谢!!!
var ifBlock = function (options) {
var options1 = options['entry']
var options2 = options['condition']
if (options1 != null && options2 != null) {
return eval("VB.interpreter.dictionary["+options1+"]" + " " + options2)
} else {
return false
}
}
【问题讨论】:
-
您的 eval 中的代码将生成无效的 javascript。
VB.interpreter.dictionary[somevalue] someothervalue你错过了=吗?你不需要 eval 。 -
给出的代码应该可以工作,给
options1和options2的正确值。
标签: jquery input syntax-error