内容见附件
- 16:57
- 浏览 (34)
- 评论 (0)
- 分类: JScript Deviations from ES3
关于内容见附件!
- 16:53
- 浏览 (47)
- 评论 (0)
- 分类: JScript Deviations from ES3
/*
官网原文:
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 ...
- 17:18
- 浏览 (28)
- 评论 (0)
- 分类: JScript Deviations from ES3
/*
官网原文:
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 ...
- 17:01
- 浏览 (34)
- 评论 (0)
- 分类: JScript Deviations from ES3
/*
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 ...
- 16:59
- 浏览 (33)
- 评论 (0)
- 分类: JScript Deviations from ES3
/*
官网原文:
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
{
...
- 15:52
- 浏览 (27)
- 评论 (0)
- 分类: JScript Deviations from ES3
/*
官网原文:
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 ...
- 15:46
- 浏览 (22)
- 评论 (0)
- 分类: JScript Deviations from ES3
/*
官网原文:
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)
...
- 15:44
- 浏览 (22)
- 评论 (0)
- 分类: JScript Deviations from ES3
/*
官网原文:
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)
{
...
- 20:46
- 浏览 (41)
- 评论 (0)
- 分类: JScript Deviations from ES3
/*
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
...
- 20:05
- 浏览 (39)
- 评论 (0)
- 分类: JScript Deviations from ES3
/*
官网原文:
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 ...
- 20:02
- 浏览 (36)
- 评论 (0)
- 分类: JScript Deviations from ES3
/*
注意每个浏览器的实现方式不同,他们处理的方法也不同.
官网原文:
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]);
...
- 19:43
- 浏览 (42)
- 评论 (0)
- 分类: JScript Deviations from ES3
/*
官网原文:
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:
...
- 19:35
- 浏览 (32)
- 评论 (0)
- 分类: JScript Deviations from ES3
/*
官网原文:
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 ...
- 19:25
- 浏览 (65)
- 评论 (2)
- 分类: JScript Deviations from ES3
- 浏览: 12379 次
- 性别:

- 来自: 北京

- 详细资料
搜索本博客
最近加入圈子
链接
最新评论
-
通用化Web表单验证方式的 ...
kuangbaoxu 写道验证时创建数组的函数,注意其与页面元素的对应关系。 ...
-- by lims -
通用化Web表单验证方式的 ...
楼上的,你这叫通用吗!要是改天老板要求改一下字段,一大堆东西要改,而已如果说要移 ...
-- by JerrySun -
事件设计模式
...
-- by cheaizheng -
DBCP数据库连接池
dbcp是不太稳定,c3p0总体反应好一点,而且参数更多,可配置性更强。
-- by sunsong -
DBCP数据库连接池
恩 学习到了
-- by zojomotico






评论排行榜