<%@ page contentType="text/html;charset=UTF-8" language="java" %><html><head> ? ?<title>get</title></head><body><form action=""id="forml"> ? ?<p>評(píng)論:</p> ? ?<p>姓名:<input type="text" name="username"id="username"></p> ? ?<p>內(nèi)容:<textarea name="content" ?cols="30" rows="10"></textarea></p> ? ?<p><input type="button" id="send" value="提交"></p></form><div class="comment">已有評(píng)論:</div><div id="resText"></div><script src="static/js/jquery-1.8.3.min.js"></script><script> ? ?$(function () { ? ? ? ?$("#send").click(function () { ? ? ? ? ? ?$.post("get.jsp",{ ? ? ? ? ? ? ? ?username:$("#username").val(), ? ? ? ? ? ? ? ?content:$("#content").val() ? ? ? ? ? ?},function (data,textStatus) { ? ? ? ? ? ? ? ?$("#resText").append(data); ? ? ? ? ? ?}) ? ? ? ?}) ? ?})</script></body></html>
為什么提交之后是這樣的?
薏苡x
2017-07-26 15:03:37