handle error in js

1
2
3
4
5
try {
something
} catch (e) {
window.location.href = `http://stackoverflow.com/search?q=[js]${e.message}`
}

filter in CSS

CSS3 中 Filter的应用

Filter是CSS3中对图片添加特效的方法,可以认为是一种滤镜

基本语法是:

1
2
3
4
5
6
7
8
9
filter: <filter-function> [<filter-function>]* | none
/* examples */
.mydiv { filter: grayscale(50%) }
img {
filter: grayscale(0.5) blur(10px);
}
CSS

Brtfs Filesystem

Btrfs文件系统

Btrfs是新一代的Linux文件系统,目标是取代Linux目前的ext3文件系统,改善ext3的限制,特别是单一文件大小的限制,总文件系统大小限制以及加入文件校验和特性。

this in js

浅谈js里的this

this是Javascript中的一个关键字,它代表函数运行时,自动生成的一个内部对象,指向调用函数的那个对象

js