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. bootstrap的学习-基础样式和排版一

    一.列表去除样式和横排排列 classs="list-unstyled","list-inline" 二.[表格].table 类指定基本样式,.table-s ...

  2. javascript 小技巧

    1:Boolean()==!! console.log(Boolean(888));//true console.log(!!(888));//true console.log(Boolean(&qu ...

  3. Python + OpenCV2 系列:2 - 图片操作

    这些相当于我的学习笔记,所以并没有很强的结构性和很全的介绍,请见谅. 1 读取.写入图像 下面是一个简短的载入图像.打印尺寸.转换格式及保存图像为.png的例子: # -*- coding: utf- ...

  4. C#和SQL实现的字符串相似度计算代码分享

    http://www.jb51.net/article/55941.htm C#实现: 复制代码 代码如下: #region 计算字符串相似度        /// <summary>   ...

  5. thinkphp 3.2.3 连接sql server 2014 WAMPSERVER环境包

    安装 sqlsrv 扩展 首先  sql server 2014 安装没啥说的 链接信息自己设置 php 版本 :5.5.12 sqlsrv 驱动  微软提供了 3.0 和3.1 版本  3.0 对应 ...

  6. State Threads——异步回调的线性实现

    State Threads——异步回调的线性实现 原文链接:http://coolshell.cn/articles/12012.html 本文的标题看起来有点拗口,其实State Threads库就 ...

  7. Orchard源码分析(3):Orchard.WarmupStarter程序集

    概述 Orchard.WarmupStarter程序集包含三个类:WarmupUtility.WarmupHttpModule和Starter<T>.该程序集主要为Orchard应用启动初 ...

  8. python 默认全局变量

    python 内置默认全局变量print (vars()) __doc__ #py文件头部的注释 '''我是一个注释例子''' print (vars()) __file__ #当前文件路劲__pac ...

  9. android自定义控件(7)-获取自定义ImageView的src属性

    创建一个自定义组件,继承 ImageView.在我的 xml 布局文件中是这样设置的: <Mycomponent android:src="@drawable/my_test_imag ...

  10. 新浪微博客户端(35)-使用NSMutableAttributedString实现多行文本的效果

    DJComposeViewController.m import "DJComposeViewController.h" #import "DJAccountTool.h ...