首页 > 其他分享 >response.getWriter().write()和 response.getWriter().print()的区别

response.getWriter().write()和 response.getWriter().print()的区别

时间:2022-09-18 15:22:08浏览次数:116  
标签:function write 前端 getWriter data response

这两个方法都是把后台数据带到前端去(具体前端是怎么处理,看前端怎么处理)

<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

相关文章