1.jquery 使用append 进行大量操作是 会导致 内存溢出
解决:使用原生代码
参考:http://caibaojian.com/jquery-performance-optimization.html
原因分析:jquery 针对 append html 操作 先解析 字符串 再生成 node element
2.修改代码 要级联修改相关的部分
3.ios 点击事件 不是click 而是 touchStart
4.多层 div 点击事件 穿透问题
解决:隐藏下层DIV
5.中文首字母提取,姓氏 发音
6.通过
/**
* 获取IP地址
* @param request
* @param response
* @param loginName
* @return
* @throws
*/
public static String getWebIp(HttpServletRequest request,HttpServletResponse response) {
String ip = request.getHeader("x-forwarded-for");
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
return ip;
}
获取用户IP地址可能为:223.104.33.67, 123.151.42.47
7.事务里保存数据 再查询 是查询不到数据的
8.获取重定向Url时 获取 queryString
request.getQueryString()==null?"":"?"+request.getQueryString()).toString()
9.ie document.head 不兼容,需要使用document.getElementsByTagName('head')[0]
10.使用System.getProperty("catalina.base") 获取tomcat 路径
11. maven 下载失败时 删除m2文件夹下的 相关目录 重试
12.update project 会根据pom 文件 改变 部署规则
13.ie 兼容性代码
<!--[if lt IE 7]> <html lang="en" ng-app="myApp" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html lang="en" ng-app="myApp" class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html lang="en" ng-app="myApp" class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<!–[if lte IE 8]>
<meta http-equiv=”x-ua-compatible” content=”ie=7″ />
<![endif]–>
<!–[if IE 9]>
<meta http-equiv=”x-ua-compatible” content=”ie=9″ />
<![endif]–>