1、基本数据类型:字符串、小数、整数、日期时间、布尔型等。

2、变量:【var】定义变量:var a;所有变量定义都用var定义,var是通用的可变类型。

3、类型转换:转为整数:parseInt();  转为小数:parseFloat();

4、运算符:

数学运算符:+ - * / % ++ --;

关系运算符:==  !=  >  >=  <  <=;

逻辑运算符:&&  ||  !;

其它运算符:+= -= *= /= %= ?:

5、语句:分为顺序,分支和循环语句。

分支:if(){}else{}       switch(){case :break;}

循环:for(;;){}

6、数组:var array = new Array();   取值:array[0];

7、函数:定义函数:function 函数名(参数) { 函数体 }     返回值可以是var类型也可以return个值

弹窗:

alert("alert");取消 叉
confirm("confirm");确定 取消 叉
prompt("prompt","你输入啊");输入 确定 取消 叉

2016年10月30日--JavaScript语法的更多相关文章

  1. 2016年10月30日 星期日 --出埃及记 Exodus 19:15

    2016年10月30日 星期日 --出埃及记 Exodus 19:15 Then he said to the people, "Prepare yourselves for the thi ...

  2. 2016年12月30日 星期五 --出埃及记 Exodus 21:25

    2016年12月30日 星期五 --出埃及记 Exodus 21:25 burn for burn, wound for wound, bruise for bruise.以烙还烙,以伤还伤,以打还打 ...

  3. 2016年11月30日 星期三 --出埃及记 Exodus 20:21

    2016年11月30日 星期三 --出埃及记 Exodus 20:21 The people remained at a distance, while Moses approached the th ...

  4. 2016年10月31日 星期一 --出埃及记 Exodus 19:16

    2016年10月31日 星期一 --出埃及记 Exodus 19:16 On the morning of the third day there was thunder and lightning, ...

  5. 2016年10月29日 星期六 --出埃及记 Exodus 19:14

    2016年10月29日 星期六 --出埃及记 Exodus 19:14 After Moses had gone down the mountain to the people, he consecr ...

  6. 2016年10月28日 星期五 --出埃及记 Exodus 19:13

    2016年10月28日 星期五 --出埃及记 Exodus 19:13 He shall surely be stoned or shot with arrows; not a hand is to ...

  7. 2016年10月27日 星期四 --出埃及记 Exodus 19:12

    2016年10月27日 星期四 --出埃及记 Exodus 19:12 Put limits for the people around the mountain and tell them, `Be ...

  8. 2016年10月26日 星期三 --出埃及记 Exodus 19:10-11

    2016年10月26日 星期三 --出埃及记 Exodus 19:10-11 And the LORD said to Moses, "Go to the people and consec ...

  9. 2016年10月25日 星期二 --出埃及记 Exodus 19:9

    2016年10月25日 星期二 --出埃及记 Exodus 19:9 The LORD said to Moses, "I am going to come to you in a dens ...

随机推荐

  1. QT的安装和配置及helloqt程序的编写时遇到的问题

    1.如果在Windows下命令行编译和运行.cpp 文件,需要找到合适的命令所在文件夹的目录,把它添加到Windows的环境变量里去,SystemPropertiesAdvance. 如qmake 在 ...

  2. warning C4005: “AF_IPX”: 宏重定义的解决办法

    warning C4005: “AF_IPX”: 宏重定义warning C4005: “AF_IPX”: 宏重定义 解决方法: 由以上代码可以看出如果在没有定义WIN32_LEAN_AND_MEAN ...

  3. Java关键字——static

    static申明属性 如果有属性希望被所有对象共享,则必须将其申明为static属性. 使用static声明属性,则此属性称为全局属性,有时候也称为静态属性. 当一个类的属性申明位static的时候, ...

  4. Maven打包可执行jar

    参考文献:http://blog.csdn.net/xiao__gui/article/details/47341385 方法:使用assembly插件,生成的jar包名为xxx-jar-with-d ...

  5. Cache-Aside Pattern解析

    使用这种模式,可以帮助我们维护Cache中的数据. 使用Cache容易遇到的问题: 使用缓存,主要是为了将一些重复访问的数据存到缓存,开发者希望缓存中的数据和数据源中的保持一致,这就需要程序中有相应的 ...

  6. C++ 以费波纳茨数列为权重的加权均值计算方法 wMA

    #pragma once #include <iostream> using namespace std; template <typename T> double *wMA( ...

  7. array_filter移除空数组

    $arr = array( "0"=> "564645", "1"=>"", "2"=& ...

  8. 密钥文件snk

    1.(what)是什么? 由一个程序集的标识组成并通过公钥和数字签名(针对该程序集生成)加强的名称,其中的标识包括程序集的简单文 本名称.版本号和区域性信息(如果提供的话).   2.(why)为什么 ...

  9. iOS数据库学习(1)-安装Navicat

    1.下载Navicat Premium 11.0.16.dmg 已经放到百度网盘,里面有安装文件和注册机 下载链接: http://pan.baidu.com/s/1sjI64HZ  密码: 2h7q ...

  10. android自定义控件(4)-自定义水波纹效果

    一.实现单击出现水波纹单圈效果: 照例来说,还是一个自定义控件,观察这个效果,发现应该需要重写onTouchEvent和onDraw方法,通过在onTouchEvent中获取触摸的坐标,然后以这个坐标 ...