ITeye博客

web

共 3 篇文章

jquery浏览器兼容性问题集

1、jquery 获取<select> 标签选中值的用法,eg: IE8:$("#test option:selected ").val(),不能用$("#test ").val() chrome:$("#test option:selected ").val()或者$("#test").val()均可。 2、 具有 true 和 false 两个属性的属性,如 checked, selected 或者 disabled 使用prop(),其他的使用 attr(),例如: $(“#test ”).prop(“checked”); 判断是否选中等可以用jquery的is函数:var p = $…

2015-05-07 17:43 · web

springmvc国际化

1.调用的工具类: /** 工具类 **/ public class InternationalizationUtil { private static ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:applicationContext-i18n.xml"); private static MessageSourceAccessor messageSourceAccessor; static { MessageSource messageSource = (MessageSource)ctx.ge…

2015-05-07 17:39 · web · i18n

改变web传入的参数

1.添加注解方法 public @interface TestAnnotation { ...... } 2、继承HandlerMethodArgumentResolver接口, public class TestArgumentResolver implements HandlerMethodArgumentResolver { @Override public boolean supportsParameter(MethodParameter parameter) { return parameter.hasParameterAnnotation( TestAnnotation.clas…

2015-05-07 17:33 · web