2017年11月29日

HttpServletRequest.getContextPath()取得的路径

摘要: 如果项目名称为test,你在浏览器中输入请求路径:http://localhost:8080/test/pc/list.jsp 执行下面向行代码后打印出如下结果: 1、 System.out.println(request.getContextPath()); 打印结果:/test 2、System 阅读全文
posted @ 2017-11-29 10:15 酱油瓶儿 阅读(9046) 评论(0) 推荐(8)
2017年11月25日

@ResponseBody 返回乱码 的解决办法

摘要: 1:最快的 最简单的办法是 在Ajax请求脸面指定头信息Accept属性,StringHttpMessageConverter默认iso-8859-1编码,但是会根据请求头信息指定的编码格式来转换,所以只需要在ajax请求的时候指定头信息Accept属性就可以了。 2:spring MVC有一系列H 阅读全文
posted @ 2017-11-25 18:00 酱油瓶儿 阅读(1093) 评论(0) 推荐(0)

SpringMVC拦截静态资源的处理办法

摘要: SpringMVC拦截静态资源导致 JS CSS 无法加载 可以在配置文件中加入以下代码 阅读全文
posted @ 2017-11-25 17:37 酱油瓶儿 阅读(213) 评论(0) 推荐(0)

SpringMVC框架出现 405 request method post not supported 的解决方法

摘要: 在SpringMVC框架中当使用post请求服务,然后请求成功转到一个静态文件,如html,htm等网页时。页面出现405 request method post not supported错误,只要在spring的配置文件中加入下面代码即可: 阅读全文
posted @ 2017-11-25 17:30 酱油瓶儿 阅读(6569) 评论(0) 推荐(0)

让DIV随滚动条滚动

摘要: $(window).scroll(function(event){ //JQ监听滚动条 $('DIV').css("top", $(window).scrollTop()-300);//设置DIV的top}); 阅读全文
posted @ 2017-11-25 17:18 酱油瓶儿 阅读(652) 评论(0) 推荐(0)

css3的perspective()使用

摘要: perspective() 未完待写 阅读全文
posted @ 2017-11-25 03:27 酱油瓶儿 阅读(441) 评论(0) 推荐(0)

jQuery获取父级、兄弟节点的方法

摘要: 一、jQuery的父节点查找方法 $(selector).parent(selector):获取父节点 $(selector).parentNode:以node[]的形式存放父节点,如果没有父节点,则返回空数组 $(selector).parents(selector):获取祖先元素 二、jQuer 阅读全文
posted @ 2017-11-25 03:18 酱油瓶儿 阅读(1387) 评论(1) 推荐(0)