首页>代码>spring mvc-showcase,便于学习springmvc,maven工程,建议使用谷歌浏览器>/spring-mvc-showcase/src/main/java/org/springframework/mvc/extensions/ajax/AjaxUtils.java
package org.springframework.mvc.extensions.ajax;

import org.springframework.web.context.request.WebRequest;

public class AjaxUtils {

	public static boolean isAjaxRequest(WebRequest webRequest) {
		String requestedWith = webRequest.getHeader("X-Requested-With");
		return requestedWith != null ? "XMLHttpRequest".equals(requestedWith) : false;
	}

	public static boolean isAjaxUploadRequest(WebRequest webRequest) {
		return webRequest.getParameter("ajaxUpload") != null;
	}
	
	private AjaxUtils() {}

}
最近下载更多
lwp011  LV27 2020年7月7日
truenoakina123  LV3 2019年10月17日
其他昵称  LV10 2018年8月31日
chinafjfzlj  LV31 2017年9月7日
shifukuan  LV10 2017年9月1日
sevenvsky  LV27 2016年12月29日
huangguoqiang  LV1 2016年8月19日
huachen  LV2 2016年5月29日
luoshaoke  LV1 2016年4月14日
jefferyqjy  LV1 2015年12月13日
最近浏览更多
a1677596408  LV23 2022年7月1日
twedss 2022年6月17日
暂无贡献等级
anbangchen89  LV2 2022年3月3日
535871265 2022年1月10日
暂无贡献等级
HCY666  LV2 2021年12月22日
1727779658  LV7 2021年12月20日
Hadoop_CPU  LV6 2021年11月29日
fengzhou888  LV5 2021年11月26日
2532467971  LV2 2021年10月14日
王东东  LV17 2021年3月21日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友