Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Object.prototype.eval()

已废弃
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Object.eval() 方法用于在对象的上下文中对 JavaScript 代码字符串求值,但该方法已被移除。

语法

obj.eval(string)

参数

string
包含任意 JavaScript 表达式、语句或一组语句的字符串。表达式中可包含已有对象的变量与属性。

描述

eval 方法已从对象方法中移除。可使用全局 eval() 函数替代该方法。

规范

暂无规范

浏览器兼容性

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 未实现 未实现 未实现 未实现 未实现
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 未实现 未实现 未实现 未实现 未实现 未实现

相关链接

文档标签和贡献者

 此页面的贡献者: doodlewind
 最后编辑者: doodlewind,