-3
var resolvedOptionOther =“\'”+“#”+ a +“\'”;angularjs语法错误无法识别的表达式
错误:语法错误,无法识别的表情:“#1选项
这是我function--
if ($scope.solvedQuestionId.contains(otherQuestionID)) {
$scope.otherid= otherQuestionID;
var optionIndex = $scope.solvedQuestionId.indexOf(parseInt($scope.otherid)) + 1;
$scope.optionOtherIndex = optionIndex;
var a = $scope.solvedQuestionId[optionIndex]
var solvedOptionOther = "\'" +"#"+ a + "\'";
alert(solvedOptionOther);
$(".option").css("border","none");
/* $("#" +$scope.optionOtherIndex).css("border","none");*/
$('.option').css('pointer-events','none');
$("#" +$scope.answersOfQuestion.answer).css("border","green solid 2px");
alert("solved");
$(solvedOptionOther).css("border","red solid 2px");
}
你有什么问题吗?我们可以假设几件事情,但你必须更精确 –
var resolvedOptionOther =“\'”+“#”+ a +“\'”; (获取错误:语法错误,无法识别的表达式)在这一行 –