Skip to main content

Diigo Home
Home/ Groups/ InfokeyDEV
kooala lo

Microsoft SuperPreview for IE 你的網頁兼容於不同版本的 IE 嗎?快來校調一下! | 免費資源網路社群... - 1 views

  • kooala lo
     
    superpreview 可惜只能看
Benx Shen

JavaScript: The World's Most Misunderstood Programming Language - 1 views

  • Why is this language so misunderstood?
  • Is JavaScript object-oriented? It has objects which can contain
    data and methods that act upon that data. Objects can contain other
    objects. It does not have classes, but it does have constructors
    which do what classes do, including acting as containers for class
    variables and methods. It does not have class-oriented inheritance,
    but it does have prototype-oriented inheritance.
Benx Shen

A re-introduction to JavaScript - MDC - 0 views

  • It's useful to start with an idea of the language's history. JavaScript was created in 1995 by Brendan Eich, an engineer at Netscape, and first released with Netscape 2 early in 1996. It was originally going to be called LiveScript, but was renamed in an ill-fated marketing decision to try to capitalise on the popularity of Sun Microsystem's Java language — despite the two having very little in common. This has been a source of confusion ever since.
  • var name = o && o.getName();
  • var name = otherName || "default";
  • ...9 more annotations...
  • The first argument to apply() is the object that should be treated as 'this'.
  • apply() has a sister function named call, which again lets you set 'this' but takes an expanded argument list as opposed to an array.
  • Closures
  • A closure is the combination of a function and the scope object in which it was created.


    Closures let you save state - as such, they can often be used in place of objects.

  • An unfortunate side effect of closures is that they make it trivially easy to leak memory in Internet Explorer.
  • The above code sets up the element to turn red when it is clicked. It also creates a memory leak. Why? Because the reference to el is inadvertently caught in the closure created for the anonymous inner function. This creates a circular reference between a JavaScript object (the function) and a native object (el).
  • delete el;
  • Surprisingly, one trick for breaking circular references introduced by a closure is to add another closure:
  • var clickHandler = function() {
    this.style.backgroundColor = 'red';
    }
    (function() {
    var el = document.getElementById('el');
    el.onclick = clickHandler;
    })();
Benx Shen

Jash: JavaScript Shell - 0 views

  • Jash is a DHTML-based window that gives you command-line
    JavaScript access to the current browser window
kooala lo

MySQL Tutorial - 0 views

shared by kooala lo on 07 Oct 09 - Snapshot
kooala lo

Chapter 20. Stored Procedures and Functions - 1 views

  • kooala lo
     
    mysql stored procedure 101
涼鞋

Home Network Security - 0 views

  • 涼鞋
     
    Security
1 - 20 of 457 Next › Last »
Showing 20 items per page
Join this group