2008-07-08

XMLHttpRequest

关键字: xmlhttprequest
内容见附件
2008-07-08

使用Javascript和DOM Interfaces来处理HTML

关键字: 使用javascript和dom interfaces来处理html
关于内容见附件!
2008-06-30

String.prototype.split

关键字: string.prototype.split
/* 官网原文: ES3 states that “If separator is a regular expression that contains capturing parentheses, then each time separator is matched the results (including any undefined results) of the capturing parentheses are spliced into the output array.” JScript ignores the capturing parentheses. FF ...
2008-06-30

Array.prototype.unshift

关键字: array.prototype.unshift
/* 官网原文: Array.unshift prepends its arguments to the start of the array and is supposed to return the length of the resultant array. The returned value of this function call in JScript is “undefined”. */ // 将指定的元素插入数组开始位置并返回该数组。 var a = new Array(1, 2, 3); var l = a.unshift(); docum ...
2008-06-30

Array.prototype.join

关键字: array.prototype.join
/* JScript does not default the separator to “,” if the separator value is undefined. */ var array = [1, 2]; alert(array.join()); alert(array.join(undefined)); alert(array.join('-')); /* Output: IE: 1,2 1undefined2 1-2 FF: 1,2 1,2 1-2 Opera: same as FF Safari: same ...
2008-06-30

The try statement:

关键字: the try statement:
/* 官网原文: In JScript, the variable used to hold a caught exception is visible in the enclosing scope. The variable exists after the catch clause has finished executing but ceases to exist after the function where the catch clause was located exits. */ function foo() { try { ...
2008-06-30

Enumerating shadowed

关键字: enumerating shadowed
/* 官网原文: Custom properties that shadow [[DontEnum]] properties on Object.prototype are not enumerated using for-in. In the following example toString is a property available on Object.prototype and is shadowed on cowboy. Since such properties are not enumerated through for-in, it is not possible ...
2008-06-30

Function Declarations within bodies

关键字: function declarations within bodies
/* 官网原文: When a function is defined using a function declaration, JScript binds the function to the global scope regardless of any scope changes introduced by with clauses. */ var v = 'value 1'; var o = {v: 'value 2'}; function f1() { alert('v == ' + v); }; with (o) ...
2008-06-26

Function Expressions scope

关键字: function expressions scope
/* 官网原文: In JScript the identifier in a function expression is visible in the enclosing scope because such expressions are treated as function declarations. Example: */ <script> var foo = function bar(b) { if (b == true) { ...
2008-06-26

Array Initialiser 要小心

关键字: array initialiser 要小心
/* Trailing commas in array literals add to the length, but they shouldn‟t. JScript treats the empty element after the trailing comma as undefined. Example: */ <script> document.write([1, 2, 3,].length); </script> /* Output: IE: 4 ...
2008-06-26

全局函数不能被迭代

关键字: 全局函数不能被迭代
/* 官网原文: In JScript, global functions cannot be iterated using the global this object. Example: */ <script> var __global__ = this; function invisibleToIE() { document.write("IE can't see me"); } __global__.visibleToIE = fu ...
2008-06-26

奇怪的 Arguments 对象

关键字: 奇怪的 arguments 对象
/* 注意每个浏览器的实现方式不同,他们处理的方法也不同. 官网原文: There is no uniform handling of a variable named arguments amongst the various script engine implementations. Example: */ <script> function foo() { document.write(arguments); document.write(arguments[0]); ...
2008-06-26

注意字符串中的 "\"

关键字: \, 注意字符串中的
/* 官网原文: JScript allows C-style escaped newlines in string literals; according to ES3 this would be a syntax error for unterminated string constant Example: */ <script> var s = "this is a \ multiline string"; </script> /* Output: ...
2008-06-26

特殊的转义字符 "\v"

关键字: \v, 特殊的转义字符
/* 官网原文: JScript does not support the \v vertical tab character as a white space character. It treats \v as v. Example: */ <script> alert('\v supported ' + (String.fromCharCode(11) == '\v')); </script> /* Output: IE: false FF: true Op ...
kuangbaoxu
搜索本博客
最近加入圈子
存档
最新评论