1

界面设计中尽量少用粗体.

还有url中的參数不用再加引號,如:

method=registProtocol   不能写成method=‘registProtocol’

2.

Js获取设置一个元素的位置:

   var div = document.getElementById("minimapDiv");

       div.style.top = div.offsetTop;

       div.style.left = div.offsetLeft;

jquery获取设置一个元素的位置:

    var div = $("#minimapDiv");

     var top = div.position().top;

     var left = div.offset().left;

      div.css("top",top);

    div.css("left",left);

3.

//var agent = window.navigator.appName; //不能用appName进行浏览器推断。由于iechromeappName都是Netscape

 var userAgent = window.navigator.userAgent.toUpperCase();

 if(userAgent.indexOf("CHROME") == -1) { //chrome浏览器

   }else{}

4.

Shift+tab:向前缩进(4个字符为准)

Tab:向后缩进(4个字符为准)

Ctrl+shift+r:查找

Ctrl+/:凝视

Ctrl+d:删除当前行

Ctrl+alt+:凝视

Home:行头

End:行尾

5.

java代码设置缓存:

public static Map<String, Object> cacheMap = new HashMap<String, Object>();//用于缓存已经查询过的字段信息

if (cacheMap .get(cacheId)!=null) { //缓存中有,则拿取

return (ProtocolFieldVO)cacheMap .get(cacheId);

}

cacheMap.put(cacheId, vo);//缓存中没有,则设置

6.

出现:<Could not get the server file lock. Ensure that another server is not running in the same directory. Retrying for another 60 seconds.>

关掉javaw.exe进程

7.

Form表单提交,想要有运行后的提示信息和跳转页面。能够採用:

假设是ajax或者post请求,就能够在回调函数中alert().







相关文章:

  • 2021-07-16
  • 2021-10-25
  • 2022-02-18
  • 2021-12-19
  • 2022-12-23
  • 2021-11-17
  • 2021-11-13
  • 2021-08-02
猜你喜欢
  • 2021-04-26
  • 2021-08-08
  • 2021-09-15
  • 2022-02-01
  • 2022-01-15
  • 2021-10-29
  • 2021-07-14
相关资源
相似解决方案