惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
B
Blog
aimingoo的专栏
aimingoo的专栏
酷 壳 – CoolShell
酷 壳 – CoolShell
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
月光博客
月光博客
H
Help Net Security
V
Visual Studio Blog
量子位
A
About on SuperTechFans
博客园 - Franky
人人都是产品经理
人人都是产品经理
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
Martin Fowler
Martin Fowler
Microsoft Security Blog
Microsoft Security Blog
博客园 - 叶小钗
P
Proofpoint News Feed
MongoDB | Blog
MongoDB | Blog

博客园 - .net小鸟

产品很重要 JQUERY FAQ 无法打开到主机的连接,在端口xxx连接失败 eclipse的调试技术 js parseInt与排序 html到asp.net样式变乱 django学习资料 FAQ js工具类 python31操作MySql jquery iframe 父子互操作 .net连接mysql maven下载地址 jquery操作ul notepad++中用正则表达式 jquery 两个控件同享一个function javascript template javascript closure anonymous function javafirststep
javascript 经常会用到的东西
.net小鸟 · 2011-06-22 · via 博客园 - .net小鸟

1.var target = event.target != null ? event.target : event.srcElement;
2.e = e||window.event
3.
var scrollTop = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop;
var scrollLeft = document.body.scrollLeft ? document.body.scrollLeft : document.documentElement.scrollLeft;
4. clearSelection:function()
 {
  if(window.getSelection){//w3c 
   window.getSelection().removeAllRanges(); 
  }else  if(document.selection){ 
   document.selection.empty();//IE 
  }
 }
5. preventDefault:function(e)
 {
  e=dragObj.fixE(e);
  if(e.preventDefaults)
   e.preventDefaults();
  else
   e.returnValue=false;
 },
6. cancelBubble:function(e)
 {
  e=dragObj.fixE(e);
  if(e.stopPropagation)
  {
   e.stopPropagation();
  }
  else
  {
   e.cancelBubble=true;
  }
 },

js常用的东西

in a word ,ie is evil.