管理杂谈OA答疑ERP答疑教程搜索

javascript中的关键字和保留字


  今天在给一个对象添加名为enum的方法时,在ie下发生了错误,当时有点奇怪,然后想了下估计是javascript中关键字的问题,将名称替换了下,确实就没有问题了。现在将它的关键字和保留字贴出来,便于日后查看和避免在次出现类似的问题。


  1 关键字


  break


  case


  catch


  continue


  default


  delete


  do


  else


  finally


  for


  function


  if


  in


  instanceof


  new


  return


  switch


  this


  throw


  try


  typeof


  var


  void


  while


  with


  2 保留字


  abstract


  boolean


  byte


  char


  class


  const


  debugger


  double


  enum


  export


  extends


  fimal


  float


  goto


  implements


  import


  int


  interface


  long


  mative


  package


  private


  protected


  public


  short


  static


  super


  synchronized


  throws


  transient


  volatile


更多精彩文章浏览...
点击右上角图标分享到朋友圈
官方网站:http://www.clicksun.cn
咨询热线:400-186-1886
服务邮箱:service@clicksun.cn