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 ...
随机推荐
- JavaScript学习笔记——对象基础
javascript对象基础 一.名词解释: 1.基于对象 一切皆对象,以对象的概念来编程. 2.面向对象编程(oop Object oriented programming) A.对象 就是人们要研 ...
- php preg_match 过滤字符
$f = preg_match("/g3watches/",$date[0]['desc']); if ($f='1') { $this->error(L('不好意思,输入有 ...
- mysql Table 'performance_schema.session_variables' doesn't exist
CMD 进入MYSQL的安装目录..Bin 下 执行 mysql_upgrade -u root -p --force 输入密码..然后等待一会儿..会跑一些东西..然后重启服务
- C# 连接mongodb副本集+分片读写分离及学习资料
一.副本集配置 搭建完毕,1台主实例.1台从实例.1台仲裁实例.mongodb建议副本集中的机器数量为奇数,即至少需要3台实例 二.副本集连接字符串 1.读 mongodb://secondary.c ...
- IOS开发中@2x图片等适应不同分辨率手机
开发中,例如: nanshanImage.image=[UIImage imageNamed:@'index_pic.png']; 在项目中还保存中index_pic@2x.png的图片,此图为了只适 ...
- asp.net mvc 4 高级编程学习笔记:第三章 视图(2)
页面布局 asp.net MVC中提供了布局的支持,默认情况下才布局文件保存到 /View/Shared/目录下的_Layout.cshtml,View目录有个_ViewStart.cshtml文件, ...
- iOS- storyboard this class is not key value coding-compliant for the key xxx
如图: 在使用storyboard的时候出现此问题,主要是因为给storybroad中的view拖线的时候,有时不小心线拖错了,或者再次拖线导致代码中控件的名字与之前拖线时定义的名字不同导致的. 解决 ...
- addEventListener和on的区别
为什么需要addEventListener? 先来看一个片段: html代码 <div id="box">追梦子</div> 用on的代码 1 window ...
- Linux查看系统信息的一些命令及查看已安装软件包的命令
转自:http://cheneyph.iteye.com/blog/824746 系统 # uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看 ...
- php 计算字符串长度
在项目的开发中,常常遇到要计算一个字符串的长度(中英文结合),由于产品要求不同,每个中文的长度要求也不一样. 解决utf-8编码下的字符串长度(可自定义每个中英文算几个字节) /** * 计算字符串长 ...