Mozilla.com

  1. MDC
  2. 首页
  3. New in JavaScript 1.5
内容表格
No headers

New in JavaScript 1.5

内容表格
No headers

JavaScript 1.5版提供了如下的特性和功能曾强:

运行时错误(Runtime errors)
运行时错误(Runtime errors)将会被报告为异常(exceptions).

数字格式增强(Number formatting enhancements)
数字格式增加了Number.prototype.toExponential,Number.prototype.toFixed和Number.prototype.toPrecision方法。请参阅数字对象

正则表达式增强(Regular expression enhancements)
正则表达式添加了如下特性:

Conditional function declarations
Functions can now be declared inside an if clause. See the Defining Functions page.

方法表达式(Function expressions)
方法(Functions)(对象)可以作为表达式的一部分。请参阅定义方法(对象)

多重catch子句(Multiple catch clauses)
在try...catch表达式中,可以定义多重catch子句。请参阅The catch Block

Getter和Setter(Getters and Setters)
JavsScript对对象(Object)提供了getter和setter方法。这个特性只存在于C语言实现的 JavaScript当中。请参阅定义Getter和Setter方法

常量(Constants)
Read only named constants are supported. This feature is available only in the C implementation of JavaScript. 请参阅常量

Page last modified 12:25, 12 Jun 2008 by Cnmahj

Tags:

文件 (0)