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.
发表评论
-
新的Windows Azure服务管理API使得存储服务更易于管理
2012-01-20 09:32 392新的Windows Azure服务管理API使得存储服务更易于 ... -
编译 boost
2012-01-20 09:32 586编译 boost 2011年05月17日 ... -
[转]如何把一个Windows Phone 7 Twitter应用转换成新浪微博客户端
2012-01-20 09:32 636[转]如何把一个Windows Phone 7 Twitter ... -
《Windows核心编程》第一章 读书笔记
2012-01-20 09:32 849《Windows核心编程》第一章 读书笔记 2010年06月 ... -
在windows xp下编译WebKit
2012-01-20 09:32 618在windows xp下编译WebKit 2010年10月2 ... -
幼小衔接
2012-01-19 14:34 597幼小衔接 2010年06月02日 ... -
2011-9-20
2012-01-19 14:34 5902011-9-20 2011年09月20日 ... -
幼儿园教育笔记写什么?
2012-01-19 14:34 569幼儿园教育笔记写什么? ... -
回顾一下JavaScript的null, undefined
2012-01-17 04:21 593回顾一下JavaScript的null, undefined ... -
Replica Sets
2012-01-17 04:21 578Replica Sets 2010年12月11日 ... -
2011年01月17日
2012-01-17 04:21 5452011年01月17日 2011年01月17日 关于AS ... -
JS内置对象属性,方法查询表
2012-01-17 04:21 1016JS内置对象属性,方法查 ... -
做一个有魅力的女性
2012-01-16 03:11 543做一个有魅力的女性 2009年06月30日 女人成大事必 ... -
其实,男人很脆弱!
2012-01-16 03:11 684其实,男人很脆弱! 2011年05月19日 其实,男人很 ... -
让男人困惑的话题――女人为什么那么多话?
2012-01-16 03:11 1489让男人困惑的话题――女人为什么那么多话? 2011年06月2 ... -
会说话的女人最出色
2012-01-16 03:11 929会说话的女人最出色 20 ... -
会说话的女人最出色
2012-01-16 03:11 674会说话的女人最出色 20 ...
相关推荐
开源的搜索引擎工具包和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