1
나는 헤더에 JS 파일을 추가하려고 일부 JS 코드를 가지고,하지만 난 크롬 Uncaught ReferenceError: Invalid left-hand side in assignment
에 오류 메시지를 가지고catch되지 않은 오류 ReferenceError : 할당에 잘못된 왼쪽
SyntaxError: Unexpected token ';'. Expected ']' to end a subscript expression.
에 다른 오류가
var js = $('<script />',
{
src : 'scripts/contentStrings/content.js',
type : 'text/javascript',
language : 'javascript'
})
js.appendTo("head") <-- the error from
헤더를 확인하면 스크립트가 헤더에 추가됩니다.
도움을 주시면 감사하겠습니다. 편집
:
는 "실종"된 닫는 대괄호 : 여기sponsor["contentLong]"
는 content.js
var sponsor = {}
sponsor["containerSize"] = [[78,60] , 60 , [7,17.3] , [19,16]];
sponsor["imageBackground"] = [[78,60] , 60 , [7,17.3] , [19,16]];
sponsor["contentLong]" = "<div id='contentGroup'>Long content</div>";
sponsor["contentShort"] = "<article style='font-size:10px !important'>Some short article</article>";
'content.js'가 아니라이 스 니펫에서 오류가 발생 했습니까? 오류 메시지에 포함 된 행 번호는 무엇입니까? – Bergi
@Bergi, 네 말이 맞아요. 방금 content.js의 모든 콘텐츠를 삭제하려고했지만 그 오류 메시지가 다시 표시되지는 않지만 내 콘텐츠에서 실제 오류가 어디서 왔는지는 알 수 없습니다. 제발, 제발 내 편집 된 질문의 모양, 내 content.js 안에 코드를 추가하면 문제를 발견하는 데 도움을 줄 수 있습니다. – ilovebali