JQUERY AJAX JSON 问题 求大侠指点
前台
<script type="text/javascript">
var v_username="";
$(document).ready(function(){
$.ajax({
url: "/qzone_huifu.ashx",
type:"GET",
cache:false,
datetype:"json",
success:function(result){
alert(result);
$("#lblcount").html(result.cont1);
$("#Visitor").html(result.cont2);
}
})
});
</script>
后台
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/x-json";
context.Response.CacheControl = "no-cache";
string a = "{\"cont1\":1111,\"cont2\":2222}";
context.Response.Write(a);
}
}
一直取不到值啊啊alert(result); 这个有值
但是
result.cont1这个就是空了 求大侠指点迷津