Create a Chrome Extension to Inject JavaScript
Sometimes, when we browse the website pages, we want to control it, and let it do somethings by our expectation, such as close the advertisement doms automatically. As we known that JavaScript can fulfill it, so we should inject a JavaScript file and execute our own command.
继续阅读Win7(x64) Can not Get the Update
Recently, I reinstall my Windows 7 SP1(x64), but I can’t update the system, it always checking the update an has a high CPU usage. It’s a so long time that I can’t bear it. So I find a method that can accelerate it. Two Packet Installing and searching for updates is slow and high CPU usage occurs in Windows 7 and Windows Server 2008 R2 Windows Update Client for Windows 7 and Windows Server 2008 R2: December 2015 继续阅读Using vimpress to write blog(support slug and 'More')
Long time ago, I used vs code to write my blog, because it support markdwon syntax and can view the post immediately. Recently, I found vs code is not so useful, and sometimes, it is so slowly when start. So I switch to Vim, and use Vim to write posts.
继续阅读JavaScript和jQuery中获取div宽度和高度的方法小记
前文 关于CSS中box-sizing属性的一点心得 中介绍了关于box-sizing 并顺带写了一下盒模型,突发奇想了一个问题:使用 JavaScript 和 jQuery 获取的宽度是盒模型中的哪一部分的宽和高呢?
继续阅读关于CSS中box-sizing属性的一点心得
最近需要写这样一个布局:一个父元素,里面有两个子元素,两个子元素的宽度为父元素的一半。这在CSS中倒是一个很简单的问题,所以很容易就有如下代码。
<style type="text/css">
*{
padding : 0;
margin : 0;
}
#outer{
width : 600px;
height : 300px;
background : red;
color : white;
}
#outer:after{
content : "";
clear : both;
}
#in1{
width : 50%;
height : 80%;
float : left;
background : blue;
}
#in2{
width : 50%;
height : 80%;
float : right;
background : green;
}
</style>
<div id="outer">
<div id="in1">
IN1
</div>
<div id="in2">
IN2
</div>
</div>
继续阅读
XMLHttpRequest中的进度事件响应及注意事项
在W3C的标准中制定了关于XMLHttpRequest 2级的相关规范,增加了许多极其有用的方法,如loadstart
,loadend
,progress
等。最近写了一个应用需要监控上传信息,有一个细节很有意思,这里记录一下。