当前位置: 代码迷 >> JavaScript >> 靠山返回的json取值
  详细解决方案

靠山返回的json取值

热度:158   发布时间:2012-09-08 10:48:07.0
后台返回的json取值


??function down_kcd(tsk_id,index,a_obj){
????? $.post(
?????"hblims/sample/taskSampleList!queryTaskKcd.action",
?????{tsk_id:tsk_id},
?????function(data){
?????alert(data);
?????? var obj = eval("(" + data + ")");//转换后的JSON对象
?????? var att_id = obj.EXP_SOLUTION_ATT_ID;
?????? alert('attId ='+att_id);
?????? if(att_id!=null){
??????? a_obj.href='<%=basePath%>/hblims/task/taskAction!downLoadFile.action?&attId='+att_id;
???????// eval(a_obj.href());
?????? }else{
?????????? a_obj.href="JavaScript:$.messager.alert('提示','此任务写不存在勘察方案!')";
?????? }
?????}
????);
??}

  相关解决方案