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. Linux开放1521端口允许网络连接Oracle Listene

    症状:1. TCP/IP连接是通的.可以用ping 命令测试. 2. 服务器上Oracle Listener已经启动.  lsnrctl status  查看listener状态  lsnrctl s ...

  2. Cloudservice程序设置Idle timeout

    部署的云服务程序,默认的idle timeout是4分钟,意味着如果你通过一个workerrole发布了wcf服务,客户端第一次调用服务方法后,再过4分钟尝试去重新调用服务,会报错,具体测试如下: 1 ...

  3. jquery mobile 图片自适应问题

    解决办法: 加入一段css <link rel="stylesheet" href="http://jquerymobile.com/demos/1.1.0/doc ...

  4. JAVA JLabel自定义子类无法显示

    import java.awt.*; import java.util.Scanner; import javax.swing.*; public class Test_16_13 extends J ...

  5. sql之truncate 、delete与drop区别

    sql之truncate .delete与drop区别相同点:truncate 和不带 where 子句的 delete,以及 drop 一定会删除表内的数据不同点:1. truncate 和 del ...

  6. WindowsService 创建.安装.部署

    windows服务的用法很适合用于一些长期跑的项目..不需要人工操作..不需要服务器一直登陆..很方便.. 不说废话..直接开整.. 启动VS2012..创建Windows服务项目.. 确定..创建成 ...

  7. 使用CFURLCreateStringByAddingPercentEscapes进行URL编码

    iOS程序访问HTTP资源时需要对URL进行UTF8编码,特酷吧在之前一直都喜欢使用NSString的stringByAddingPercentEscapesUsingEncoding方法进行编码.今 ...

  8. 脱离 Spring 实现复杂嵌套事务,之一(必要的概念)

    事务传播行为种类 Spring在TransactionDefinition接口中规定了7种类型的事务传播行为, 它们规定了事务方法和事务方法发生嵌套调用时事务如何进行传播: 表1事务传播行为类型 事务 ...

  9. regsvr32的使用

    注册器是: DllRegisterServer 命令就是: regsvr32 不是regsrv32.

  10. systemd

    本文参照:https://wiki.archlinux.org/index.php/Systemd#Basic_systemctl_usage 做了翻译和整理 systemd是Linux下的一种ini ...