如何判断一个请求是不是ajax请求
原文:http://blog.csdn.net/easy_is_good/article/details/53609057
public boolean isAjaxRequest(HttpServletRequest request){ String header = request.getHeader("X-Requested-With"); boolean isAjax = "XMLHttpRequest".equals(header) ? true:false; return isAjax; }
看完打开支付宝扫一扫领个红包吧!