我正在使用以下代码来查找具有该属性的特定行。这不是在Safari 5.1.7布劳尔的工作,它引发错误语法错误,无法识别的表达式:#groups TR [数据group_mandatory =“真”属性等于选择器无法在safari中识别5.1.7
$('#groups tr[data-group_mandatory="true"').each(function(){
// Some Logic here.
});
我正在使用以下代码来查找具有该属性的特定行。这不是在Safari 5.1.7布劳尔的工作,它引发错误语法错误,无法识别的表达式:#groups TR [数据group_mandatory =“真”属性等于选择器无法在safari中识别5.1.7
$('#groups tr[data-group_mandatory="true"').each(function(){
// Some Logic here.
});
你缺少右方括号,请更正如下图所示:
$('#groups tr[data-group_mandatory="true"]')
^-- bracket was missing
现在有效。非常感谢。 –
很高兴帮助你:) –
你应该仔细看了一下错误,你得到了。你的代码中有错字。你没有关闭方括号的名称数值选择:
$('#groups tr[data-group_mandatory=true]').each(function(){
// Some Logic here.
});
应该是'$('#组TR [数据 - group_mandatory =“true”]')' –
'#groups tr [data-group_mandatory =“true”]'' - 缺少']'? –