10-08-30 09:08:21 by cmc
对于input,onkeyup onkeypress绑定函数中,若改变了value的值(或被重新赋值,不论赋值前后值改变与否),光标的位置在各浏览器不一致,见以下代码:
[code]if (window.addEventListener) {
elem.a...
10-08-30 03:08:03 by cmc
The onchange event is fired when the element loses the focus and the contents have changed since the last time the element got the focus. To detect when the contents have changed
...
10-08-15 12:08:43 by cmc
10-08-12 19:08:38 by cmc
onclick 相当于 在某一元素上触发了 onmousedown(即鼠标按下)后 任然在该元素 上 触发了onmouseup(鼠标按键弹起)才触发 onclick;
有以下情况: 对于某元素A 绑定了 click事件 并同时对另外 的元素B 绑定onblu...
10-08-04 14:08:40 by cmc
虽然今天的微博上记录了这些问题,但还是写在这里,加深印象
[list]
IE对于元素的innerHTML属性会自动转换标签大小写,属性甚至可能被去掉引号,这与其他浏览器基本原样(会转换单引号为双引号)返回innerHTML不...
10-08-01 21:08:53 by cmc
From jQuery 1.4+ ,The jQuery.contains:
jQuery.contains( container, contained )
container:containerThe DOM element that may contain the other element.
contained:containedThe DOM node that may be...
10-08-01 01:08:10 by cmc
[code]<head>
<script>
function GetEventType (eventObj) {
//eventObj 即Event对象
}
</script>
</head>
<body>
<button oncl...
10-07-24 10:07:32 by cmc
select.options.add:
Inserts an option element into the current collection at the specified position.
The add method of a select element is similar to this method, but it insert an option element...
10-07-22 09:07:43 by cmc
html代码过滤,三种等价方法:
[code]htmlFilter = function(str){
var codeHash={
"&":"&",
"<":"<"...
10-07-22 08:07:27 by cmc
早上来公司的路上,在中关村地铁口附近。
与一个应该是美女的美女擦肩而过,真正是仅有肩膀扎实地碰过,力度适中,身高也与我一样....很有感觉,其实我甚至在回眸的时候都没有看清她的身材...
想起一句话(佛说...
« ‹ 1 2 3 4 5 6 7 8 9 10 ...
19 › »