Stringpath=request.getContextPath();StringbasePath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>
">
<title>My JSP 'index.jsp' starting page</title>
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript">
$(function(){
$("#btn").click(function(){
$.ajax({
url:"<%=path%>/hello5.do",
success:function(data){ //data指的是从server打印到浏览器的数据
//jsonString jsonObject
//{"001":{"age":122,"name":"顺利就业"}}
var result= eval("("+data+")");
$.each(result,function(i,dom){
alert(dom.age+"\n"+dom.uname);
});
// alert(result["001"]["age"]);
}
});
});
});