
Javascript
文章平均质量分 57
zwd2005
Study/Program/Games
展开
-
mark: firefox获取dom节点css属性
https://developer.mozilla.org/En/DOM/Window.getComputedStyle以前写过一个笨方法来获取,ff自身就提供了一个方法(获取自firebug)html> head> style> div { border: 1px solid red; } #main {原创 2008-11-24 10:57:00 · 702 阅读 · 0 评论 -
Javascript对象,prototype链
Doc链接: http://docs.google.com/Doc?docid=0AZUdXGtQa0xqZGRocmo3MzZfMjA2Y2ZqZ2szZ2g&hl=en关键词:JavaScript;对象;prototype;prototype链我们来打个比方吧:随着个人电脑硬件的白菜价化,很多硬件制造商开始帮用户做整机DIY。有时候用户可能回到“总部”去装机,那里东西很全。原创 2010-01-12 20:22:00 · 918 阅读 · 1 评论 -
再来个firefox插件,在线词典
一般装个google toolbar,里面提供的在线翻译已经足够了,不过有点缺陷就是没有音标... 这样就有问题了,自创了不少单词发音,但别人就听不懂了。还好现在在线翻译很多(Google,有道,Dict.cn等等都很好,而且还带发音。ps:百度不允许放入iframe 直接无视:( )firefox addon上的词典工具真的不少,但是总有些用的不爽(没音标,弹出新窗口等等)。自己写一个吧,原原创 2009-09-21 14:41:00 · 2015 阅读 · 2 评论 -
ie7 zoom caused some js behavior weird
we always use js to calculate and set the DOM nodes position. butunder ie7, you should consider the zoom factor of the broswer, becauseits behavior is a little weird.here is a test:ps: I foun原创 2009-07-20 14:31:00 · 619 阅读 · 0 评论 -
the focus event seems like asynchronize under IE7/8
here is the test example: under firefox (3.5) : under ie: Untitled Document <!-- div { } --> div { } Test focus, press any key to swit原创 2009-07-20 14:37:00 · 567 阅读 · 0 评论 -
ajax 嘿哈
function Ajax(){ this.xhr = null; this.initialize(); }Ajax.prototype = { initialize: function() { try { this.xhr = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try {原创 2009-03-25 09:51:00 · 389 阅读 · 0 评论 -
原来firebug下的的console可以在js中调用
安装firebug后就可以在自己的js里使用console了(最新的firebug要首先启用console)。e.g.console.log(hello world); props(console)Methods: assert,clear, count, debug, dir, dirxml, error, getFirebugElement, group,gro原创 2009-02-11 13:45:00 · 1116 阅读 · 0 评论 -
Note: augment javascript's function
《Mastering Dojo》p118: Hooking javascript Functionsfunction f(i) { return "foo: " + (i+1); }var g = f;f = function() { var result = g.apply(this, arguments); console.log(exit f());原创 2009-02-11 13:51:00 · 499 阅读 · 0 评论 -
mark: firefox截屏技术
直接上连接,firefox截图+保持到本地 https://developer.mozilla.org/En/Code_snippets/Canvas转载 2009-02-11 17:15:00 · 415 阅读 · 0 评论 -
NOTE: javascript prototype chain
=== copy from mastering dojo ===What Is a Prototype?Every object in JavaScript contains a reference to anotherobject termed its prototype. Since the prototype is anotherobject itself, it also contai原创 2009-02-11 09:31:00 · 671 阅读 · 0 评论 -
自定义JavaScript类
Doc:http://docs.google.com/Doc?docid=0AZUdXGtQa0xqZGRocmo3MzZfMjEyaG5tNGdncXQ&hl=en 继续装机。看到装机能赚钱,但咱没特别的厂家支持,不过也没关系,这样能给用户提供的电脑品种反而更多。OK,那咱也打算去申请个小工作间,开始给用户装机。我们这提供多种主流的硬件配置,比如提供了Acer、Dell,这样用户只要原创 2010-01-12 20:36:00 · 789 阅读 · 0 评论