目录

JavaScript 保留字


abstract arguments await* boolean
break byte case catch
char class* const continue
debugger default delete do
double else enum* eval
export* extends* false final
finally float for function
goto if implements import*
in instanceof int interface
let* long native new
null package private protected
public return short static
super* switch synchronized this
throw throws transient true
try typeof var void
volatile while with yield

您可以在本章中阅读有关不同 JavaScript 版本的更多信息JS 版本


删除保留字

abstract boolean byte char
double final float goto
int long native short
synchronized throws transient volatile

不要将这些词用作变量。 ECMAScript 5/6 并未在所有浏览器中得到完全支持。



JavaScript 对象、属性和方法

Array Date eval function
hasOwnProperty Infinity isFinite isNaN
isPrototypeOf length Math NaN
name Number Object prototype
String toString undefined valueOf

Java 保留字

getClass java JavaArray javaClass
JavaObject JavaPackage

其他保留字

JavaScript 可以用作许多应用程序中的编程语言。

alert all anchor anchors
area assign blur button
checkbox clearInterval clearTimeout clientInformation
close closed confirm constructor
crypto decodeURI decodeURIComponent defaultStatus
document element elements embed
embeds encodeURI encodeURIComponent escape
event fileUpload focus form
forms frame innerHeight innerWidth
layer layers link location
mimeTypes navigate navigator frames
frameRate hidden history image
images offscreenBuffering open opener
option outerHeight outerWidth packages
pageXOffset pageYOffset parent parseFloat
parseInt password pkcs11 plugin
prompt propertyIsEnum radio reset
screenX screenY scroll secure
select self setInterval setTimeout
status submit taint text
textarea top unescape untaint
window

HTML 事件处理程序

此外,您应该避免使用所有 HTML 事件处理程序的名称。

onblur onclick onerror onfocus
onkeydown onkeypress onkeyup onmouseover
onload onmouseup onmousedown onsubmit