js中export的问题-真爱无悔-博客园
2011年03月25日
在JS中 定义一个函数名字是export 会报错(ff不报错,ie会),修改成其他名字就行了。
原因是,export是ECMA为将来保留的词(Words reserved for ECMA extensions)。
下面把OReilly.JavaScript.The.Definitive.Guide.5th.Editio n 2.8. Reserved Words的内容:
JavaScript has a number of reserved keywords. These are words that you cannot use as identifiers (variable names, function names, and loop labels) in your JavaScript programs. Table 2-1 lists the keywords standardized by ECMAScript v3. These words have special meaning to JavaScript; they are part of the language syntax itself. break do if switch typeof case else in this var catch false instanceof tHRow void continue finally new true while default for null try with delete function return Table 2-2 lists other reserved keywords. These words are not currently used in JavaScript, but they are reserved by ECMAScript v3 as possible future extensions to the language. abstract double goto native static boolean enum implements package super byte export import private synchronized char extends int protected throws class final interface public TRansient const float long short volatile debugger In addition to some of the formally reserved words just listed, current drafts of the ECMAScript v4 standard are contemplating the use of the keywords as, is, namespace, and use. Current JavaScript interpreters will not prevent you from using these four words as identifiers, but you should avoid them anyway. You should also avoid using as identifiers the names of global variables and functions that are predefined by JavaScript. If you create variables or functions with these names, either you will get an error (if the property is read-only) or you will redefine the existing variable or functionsomething you should not do unless you know exactly what you're doing. Table 2-3 lists global variables and functions defined by the ECMAScript v3 standard. Specific implementations may define other global properties, and each specific JavaScript embedding (client-side, server-side, etc.) will have its own extensive list of global properties.
发表评论
-
道周中学2012年高三地理寒假作业答案
2012-01-20 11:42 570道周中学2012年高三地理 ... -
化学计算题的几种常见解法
2012-01-20 11:42 554化学计算题的几种常见解法 2012年01月15日 一、差 ... -
Windows编程类书籍介绍(转)
2012-01-20 11:42 460Windows编程类书籍介绍(转) 2012年01月08日 ... -
ls命令选项详解
2012-01-20 11:42 727ls命令选项详解 2012年01月19日 http:// ... -
AS3各种判断陷阱......以及处理方法
2012-01-19 16:32 545AS3各种判断陷阱......以 ... -
JavaScript的例外处理(try...catch...finally)
2012-01-19 16:32 600JavaScript的例外处理(try...catch...f ... -
转载 js中的基本常识 收藏
2012-01-19 16:32 542转载 js中的基本常识 收 ... -
JavaScript--JavaScript对象
2012-01-19 16:32 531JavaScript--JavaScript对象 2 ... -
EGLIBC库介绍
2012-01-17 06:17 559EGLIBC库介绍 2011年05月05 ... -
给Win32 GUI程序调试信息输出方法
2012-01-17 06:17 705给Win32 GUI程序调试信息输出方法 2011年09月2 ... -
SAMSUNG S3C2440的简易BootLoader ㈢
2012-01-17 06:17 596SAMSUNG S3C2440的简易BootLoa ... -
meego开发的学习路线
2012-01-17 06:17 467meego开发的学习路线 2011年06月26日 不同版 ... -
GCC调试基础知识
2012-01-17 06:17 491GCC调试基础知识 2011年08月19日 1984年, ... -
神马都是浮云
2012-01-16 04:57 527神马都是浮云 2012年01月14日 今天给litt ... -
神马都是浮云。、
2012-01-16 04:57 564神马都是浮云。、 2011年12月12日 1、上课时,老 ... -
补考重修都是浮云!
2012-01-16 04:57 657补考重修都是浮云! 2012 ... -
神马=浮云?
2012-01-16 04:57 589神马=浮云? 2011年12月30日 我用一生的时间,在 ...
相关推荐
开源的搜索引擎工具包和web搜索引擎系统 - austin lius fashion - 博客园.docx开源的搜索引擎工具包和web搜索引擎系统 - austin lius fashion - 博客园.docx开源的搜索引擎工具包和web搜索引擎系统 - austin lius ...
开源的搜索引擎工具包和web搜索引擎系统 - austin lius fashion - 博客园.pdf开源的搜索引擎工具包和web搜索引擎系统 - austin lius fashion - 博客园.pdf开源的搜索引擎工具包和web搜索引擎系统 - austin lius ...
ibatis缓存介绍 - 勇泽 - 博客园ibatis缓存介绍 - 勇泽 - 博客园ibatis缓存介绍 - 勇泽 - 博客园ibatis缓存介绍 - 勇泽 - 博客园
【转】c# xml添加 删除 修改数据 - badnewfish - 博客园.htm【转】c# xml添加 删除 修改数据 - badnewfish - 博客园.htm【转】c# xml添加 删除 修改数据 - badnewfish - 博客园.htm【转】c# xml添加 删除 修改数据 -...
Entity Framework 6 Recipes 中文翻译系列-By博客园-china_fucan
sizeof和sizeof(string)的问题 - wanghetao - 博客园码:2/12The sizeof keyword gives the amo
C# 绘制统计图(柱状图, 折线图, 扇形图) - steven_2005 - 博客园
推荐--jQuery使用手册 - 仰天一笑 - 博客园
Spring.NET学习笔记 - 刘冬.NET - 博客园
QVector常见使用方法 - 浅浅念 - 博客园随笔- 68 文章- 0 评论- 14博客园 首页 新随笔 联系 管理 订阅QVector常见使用方法仅在此简
1.配置引脚作为输出 2.如果检测输出的是高电平则输出电平,如果检测输出的 3. ESP8266刷AT固件与node 4. 用ESP8266+android,制
Qt 格式化字符串 - Avatarx - 博客园博客园首页新随笔联系管理订阅随笔- 1695 文章- 0 评论- 3Qt 格式化字符串Qt字符串格式化性能比较
AjaxPro使用说明 - lexus - 博客园 Ajax是异步Javascript和XML(Asynchronous JavaScript and XML)的英文缩写。"Ajax"这个名词的发明人是Jesse James Garrett,而大力推广并且使Ajax技术炙手可热的是Google。Ajax的...
Linux静态库和动态库 - feisky - 博客园.mht
CobaltStrike去除流量特征 - CoLoo - 博客园1
转ibatis动态sql - phoebus0501 - 博客园.mht
Entity Framework试水系列-博客园cnblogs.rar
scrapy-redis搭建分布式爬虫环境 - 温良Miner - 博客园1
制作IOS企业版App网页扫描二维码下载安装 - 风中亭 - 博客园1
IOS开发系列—Objective-C之Foundation框架 - KenshinCui - 博客园.pdf