2018-07-29 12:41
我刚用纯粹的Servlet试了,获取不到参数。而且在pjax.submit提交时,不会走servlet的post,居然进入的是get
Request URL:http://127.0.0.1:801/baseplatform2/coderServlet
Request Method:GET
Status Code:200
Remote Address:127.0.0.1:801
Response Headers
view source
Content-Length:0
Content-Type:text/html;charset=UTF-8
Date:Sun, 29 Jul 2018 04:36:51 GMT
Request Headers
view source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch, br
Accept-Language:zh-CN,zh;q=0.8
Connection:keep-alive
Cookie:JSESSIONID=C9D7AE561BCAE9B715D0BFF93C3C2A64
Host:127.0.0.1:801
Referer:http://127.0.0.1:801/baseplatform2/coder/index
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
我的form标签
我的JS
/**
* 没有解决pjax.submit为什么参数提交不了后台,稍后再做研究!!!
*/
$(document).on("submit", "form[data-pjax]", function(event) { // 提交表单按钮监听事件
if($("#coderForm").parsley().validate()) { // 先验证表单数据
$.pjax.submit(event, "#" + RIGHT_INDEX_CONTAINERDIV , {push:false});
return true;
}
return false;
});