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 ...
随机推荐
- Tortoise SVN 安装界面
Tortoise SVN 安装界面 TortoiseSVN是Subversion版本控制系统的一个免费开源客户端,不需要为使用它而付费 第一步: 点击TortoiseSVN-1.6.6.17493-w ...
- Linux下显示IP地理位置信息的小工具-nali
一.简介 nali,名字取自中文“哪里”的拼音.nali包含一组命令行程序,其主要功能就是把一些网络工具的输出的IP字符串,附加上地理位置信息(使用纯真数据库QQWry.Dat).例如74.125.1 ...
- Runner站立会议03
开会时间:21.10~21.30 地点:二教103 今天做了什么:Android的存储,只是存储在/date/date 文件夹下和sd卡 明天准备做什么:学习Android的数据库的使用sqlite ...
- MySQL学习笔记——多表连接和子查询
多表连接查询 # 返回的是两张表的乘积 SELECT * FROM tb_emp,tb_dept SELECT COUNT(*) FROM tb_emp,tb_dept # 标准写法,每个数据库都能这 ...
- Sublime Text 3065
Package Control安装 安装方法:https://packagecontrol.io/installation 用Package Control安装插件 1.按下Ctrl+Shift+P调 ...
- tableview中在tableheaderView上放一个视图,第一次进入视图显示不正常,往下拉视图仍然不正常,往上拉视图正常
解决办法: frame来源不正常,从直接在viewDidLoad方法中设置的frame,改为 - (void)viewDidLayoutSubviews { [super viewDidLayoutS ...
- H5 使用
关闭页面 http://www.bcty365.com/content-146-3343-1.html 回退页面: plus.key.addEventListener('backbutton', fu ...
- GOF业务场景的设计模式-----设计模式六大原则
单一职责原则(Single Responsibility Principle) 定义:不要存在多于一个导致类变更的原因.通俗的说,即一个类只负责一项职责. 问题由来:类T负责两个不同的职责:职责P1, ...
- JS keycode 事件响应
<script language="javascript"> function keyevent(){ if(event.keyCode==13) alert(&quo ...
- Reading Famous blog to prevent me wasting time on blind wandering
I can`t help surfing the useless bbs and some other kind of SNS. The time I begin to do it, it costs ...