0
喜的我初學者在asp.net我在aspx頁面下面的JSON:訪問JSON在JavaScript文件
{
{
"Status":"<%= this._result.ToString().ToLower() %>" ,
"SavePath":"<%= this.FileUrl%>" ,
"FileName":"<%= this.Request["qqfile"] %>",
"SizeError":"<%= this._sizeError.ToString().ToLower()%>",
"ImgValidation":"<%=this._Imgvalid.ToString().ToLower()%>"
}
}
我需要使用像打擊JS文件中的JSON:
if (responseJSON.Status == 'false') {
$.pushMessage({
message: 'خطا در بارگزاری اطلاعات!',
messageClass: 'loader-message',
delay: 3500
});
return;
}
else {
$(options.imgPath).attr("value", responseJSON.SavePath);
$(options.imgName).html(responseJSON.FileName);
}
我如何使用JSON坦克
你是什麼意思「使用json」?你已經在使用它,當你做responseJSON.Status – Meistro
在js它不工作 – HamidSadeghi
你的JSON無效開始。你的括號嵌套太深了。您無法引用「狀態」,因爲您無法引用持有「狀態」的對象。 – Meistro