帮帮忙啊。。要哭了 ajax后台怎么传值到前台啊

后台中:
JSONObject js = new JSONObject();
js.accumulate("jStr",jStr[0]); //已经获得 jStr[0] 的值。
response.getWriter().write(js.toString());

msg="{\"result\":\"true\", \"msg\":\"CanColVideo\"}";
out.print(msg);
out.flush();

前台js中:
$.ajax({
url:aurl,
type:'POST',
data:adate,
dataType : "json",
async:false,
success:function(data)
{
if(data.msg=="colVideo")
{
$('#'+noColId).empty();
$('#'+ColId).css("display","block");
}
if(data.msg=="CanColVideo")
{
data = eval("("+data+")");
alert(data.jStr); // 怎么获得jStr[0]的值啊。。为什么老是跳object object
}
else if(data.msg=="fail")
{
window.open("请登录!");
}
},
error:function(response)
{

            alert("111111");
        },
    });

把要传的数据放在你的adata里

data.jStr获取的是数组对象吧?你调试一下,展开这个jStr看看就知道了。

其实后台json写错了,谢谢楼上两位啦