<%--
  Created by IntelliJ IDEA.
  User: WIN10
  Date: 2021/12/4
  Time: 17:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>摘要提取</title>
</head>
<style>
    .center-block {
        margin-left: 200px;
    }

</style>
<body>
<div class="center-block">
    <p>摘要提取</p>
    内容文本: </br>
    <textarea  id="content" style="width:600px;height:300px">
    </textarea>
    </br>
    <input type="button" style="width:80px;height:50px" class="btn btn-default" value="提交" onclick="clickbtn()"/>
    </br>
    摘要：</br>
    <textarea  id="summary" style="width:600px;height:300px">
    </textarea>

</div>
</body>
<!-- Bootstrap Js -->
<script src="<%=request.getContextPath()%>/assets/js/bootstrap.min.js"></script>
<!-- Metis Menu Js -->
<script src="<%=request.getContextPath()%>/assets/js/jquery.metisMenu.js"></script>
<script src="<%=request.getContextPath()%>/assets/js/jquery-1.10.2.js"></script>
<script>

        // 第三种 通过方法响应点击事件
        function clickbtn(){
            console.log("+++")
            var content = $("#content").val();
            $.ajax({
                type:"POST",
                url:"/summary/summ",
                contentType: "application/json", //必须这样写
                dataType:"json",
                data:content,//schoolList是你要提交是json字符串
                success:function (data) {
                    console.log(data)
                    $("#summary").val(data.header.data_type);
                }

            })
        }

</script>
</html>
