-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 +「\'」; (獲取錯誤:語法錯誤,無法識別的表達式)在這一行 –