03 - JavaScript标签和语法

一.标签

  1. 信息框:alert
  2. 页面输出:document.write
  3. 控制台输出:console.og

二.语法构成

  1. 区分大小写
    1.ECMAScript中的一切,交fi,函数和操作符都娃严格区分大小写 name 和 Name 或者 NAME

  2. 标识符
    1.第一个字符必须是字母、下划线或者$
    2.其他字符可以是数字、字母、下划线、$、nil、$a、_a、_$

  3. 注释符
    1.单行注释://
    2.多行注释 :/**/

  4. 变量
    1.var text = "hi"

  5. 关键字
    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

  6. 保留字
    abstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile

发布了25 篇原创文章 · 获赞 0 · 访问量 227

猜你喜欢

转载自blog.csdn.net/weixin_42746553/article/details/104326960
今日推荐