json 값뽑아내기
b.jsp
==================================
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script>
$(document).ready(function() {
$("#b").click(function() {
$.ajax({
url : "a.jsp",
cashe : false,
dataType :"json",
success : function(data) {
alert(data.aa);
},
error : function(a, b, c) {
alert(a + "," + b + "," + c);
}
});
});
});
</script>
<body>
<input type="button" id="b">
</body>
</html>
a.jsp
=================================
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
{"aa":"bb","cc":"dd"}