2017-10-18 148 views
-4

您好,我在编码方面颇为新颖,我遇到了一个错误。 我从这个代码出现以下错误:jQuery无法识别的表达式:input:checked [type = radio]

Syntax error, unrecognized expression: input:checked[type=radio][name=ASMTQUESTION:] 

这是代码:

var input = $$('#ASMTQUESTION\\:' + childId); 
    if (input.length > 1 || input.length == 0) { 
     input = $$('input:checked[type=radio][name=ASMTQUESTION:' + childId + ']');} 

请让我知道是什么错误。

+2

为什么你有2个$? –

+0

和':checked'需要在末尾 –

+0

这就是我之前包括的程序员,我已经删除了双打,所以我留下了单个$'s,但是这并不能解决错误。 –

回答

-1

属性选择应该有引号之间的值,例如:

input:checked[type="radio"] 
相关问题