Archive for the ‘生活’ Category

js 代码规范

Google JavaScript 编码规范指南: Google JavaScript 编码规范指南

不常用的css样式

记得以前遇到在chrome下的中文版本,字体无法应用小于12px的css样式,今天终于看到了解决方法。 @linxz428(林小志__linxz) 在中文版的chrome里,定义了小于12px的字体依然显示为12px. 解决办法:webkit的私有属性 html{-webkit-text-size-adjust:none;} 离完美又进了一步。

IE6下链接onclick事件处理中的请求被aborted

一大早发现,ie6下点发起对话没法弹出窗口,ff浏览器就是可以的。开启HttpWatch检测,发现点击的被aborted。 查找资料显示aborted的原因如下。 The (Aborted) value is more complex in its origin. It occurs when IE has started to process the request for a URL (e.g. to download an image), but then decides to cancel the operation. Here are some examples of when this can occur: If you click on a link or bookmark while a [...]

JS window对象常用方法

前言:不管什么,基础才是最重要的。 窗口对象的属性和方法: 格式: [window.]属性 [window.]方法(参数) opener.属性 opener.方法(参数) self.属性 self.方法(参数) parent.属性 parent.方法(参数) top.属性 top.方法(参数) 窗口名称.属性 窗口名称.方法(参数) —————————————————- ·  窗口对象的属性: document 当前文件的信息 location 当前URL的信息 name 窗口名称 status 状态栏的临时信息 defaultStatus 状态栏默认信息 history 该窗口最近查阅过的网页 closed 判断窗口是否关闭,返回布尔值 opner open方法打开的窗口的源窗口 outerHeight 窗口边界的垂直尺寸,px outerWidth 窗口边界的水平尺寸,px pageXOffset 网页x-position的位置 pageYOffset 网页y-position的位置 innerHeight 窗口内容区的垂直尺寸,px innerWidth 窗口内容区的水平尺寸,px screenX 窗口左边界的X坐标 screenY 窗口上边界的Y坐标 self 当前窗口 top 最上方的窗口 parent [...]