0
javaScript를 사용하여 코딩을 작성했습니다. 내가 오류를 다음 표시됩니다 JsLint 확인했다 free.while 오류에 대한 Jslint를 사용하여JavaScript : 예기치 않은 데이터 오류
function showPopupSettings(userName)
{
var jsonData;
setLoading("Loading User Settings");
jsonData = new function(){
this.className = "User";
this.methodName = "showPopupSettings";
this.userName = userName ;
}
data = JSON.stringify(jsonData);
$.post('ajaxpage.php',{ submit: "commonAction",data:data },
function(data) {
removeLoading();
$("#dialog")
.dialog("destroy")
.html(data)
.show()
.dialog({
modal: true,
title: "User Settings",
buttons: {
Cancel: function() {
$(this).dialog('close');
},
Password: function() {
showChangePasswordTable();
},
Save: function() {
saveNewUserSettings();
$(this).dialog('close');
}
}
});
});
}
라인 (10) :이 오류를 해결하는 방법을 데이터
예기치 않은 ... 당신은 그 오류
도 jsonData를 선언하고 한 번에 할당 할 수 있습니다. –
@Just_Mad - 가능하지만 JSLint는 다시 불평하고 이전 선언과 결합하도록 알려줍니다. –