2016年10月30日--JavaScript语法
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语法的更多相关文章
- 2016年10月30日 星期日 --出埃及记 Exodus 19:15
2016年10月30日 星期日 --出埃及记 Exodus 19:15 Then he said to the people, "Prepare yourselves for the thi ...
- 2016年12月30日 星期五 --出埃及记 Exodus 21:25
2016年12月30日 星期五 --出埃及记 Exodus 21:25 burn for burn, wound for wound, bruise for bruise.以烙还烙,以伤还伤,以打还打 ...
- 2016年11月30日 星期三 --出埃及记 Exodus 20:21
2016年11月30日 星期三 --出埃及记 Exodus 20:21 The people remained at a distance, while Moses approached the th ...
- 2016年10月31日 星期一 --出埃及记 Exodus 19:16
2016年10月31日 星期一 --出埃及记 Exodus 19:16 On the morning of the third day there was thunder and lightning, ...
- 2016年10月29日 星期六 --出埃及记 Exodus 19:14
2016年10月29日 星期六 --出埃及记 Exodus 19:14 After Moses had gone down the mountain to the people, he consecr ...
- 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 ...
- 2016年10月27日 星期四 --出埃及记 Exodus 19:12
2016年10月27日 星期四 --出埃及记 Exodus 19:12 Put limits for the people around the mountain and tell them, `Be ...
- 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 ...
- 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 ...
随机推荐
- centos 6.4 系统代理上网 设置
前面讲了yum 代理设置上网的方法,现在设置一下系统代理上网, 网上很多都不管用,已亲测管用 [root@proxy ~]# cat .bash_profile #root目下添加代理上网,蓝色代码# ...
- C#----对时间结构DateTime的使用(时间日期的使用)
1.其初始化时间是0001--0--0 0:0:0 class Program { DateTime dt; static void Main(string[] args) { Program pp ...
- Pixel & EM
http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html http://www.thomasphinney.com/2011/03/poi ...
- Python-面向对象编程(一)
初识面向对象: Python中一切皆对象,我自己,我的电脑,电脑桌,都称之为一个对象.对象是类的一个实体. 我们可以通过行为和特征(属性)来描述一个对象,比如小狗,它有四条腿,一个尾巴,两个虎牙,这就 ...
- Python开发【第四篇】:Python基础之函数
三元运算 三元运算(三目运算),是对简单的条件语句的缩写. ? 1 2 3 4 5 # 书写格式 result = 值1 if 条件 else 值2 # 如果条件成立,那么将 “值1” 赋值给 ...
- Java多线程编程核心技术---单例模式与多线程
立即加载/饿汉模式 立即加载就是使用类的时候已经将对象创建完毕. public class MyObject { //立即加载方式==饿汉模式 private static MyObject myOb ...
- MongoDB学习笔记(索引)(转)
一.索引基础: MongoDB的索引几乎与传统的关系型数据库一模一样,这其中也包括一些基本的优化技巧.下面是创建索引的命令: > db.test.ensureIndex({" ...
- mysql几种性能测试的工具使用
mysql几种性能测试的工具使用 近期由于要比较mysql及其分支mariadb, percona的性能,了解了几个这方面的工具,包括:mysqlslap sysbench tpcc-mysql,做一 ...
- RPC-远程过程调用协议
远程过程调用协议 同义词 RPC一般指远程过程调用协议 RPC(Remote Procedure Call Protocol)——远程过程调用协议,它是一种通过网络从远程计算机程序上请求服务,而不需要 ...
- dwz 多选删除
<li><a title="确实要删除这些用户吗?" target="selectedTodo" postType="string& ...