这两个方法都是把后台数据带到前端去(具体前端是怎么处理,看前端怎么处理)
<head>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#button1").click(function(){
$.get("AJAXServer",null,function(data){
alert(data);
$("#info").html(data);
});
});
})
</script>
</head>
<body>
<input type="button" id="button1" value="点我获取服务器响应信息" onclick="a()";/>
</body>
转载:https://blog.csdn.net/mmake1994/article/details/83898313
标签:function,write,前端,getWriter,data,response From: https://www.cnblogs.com/chenyi502/p/16704849.html