前面有了变量的概念和逻辑运算符,就可以写判断语句了,不过这里注意中括号的两边必须得留空格,不然报错.
运算符
赋值, 用 let 语句, 如 let "a=1"算数运算, 支持 + - * / %(模运算) **(幂运算)位运算符, 支持 >(右移) &(按位与) |(按位或) ~(按位取反) ^(按位异或)
if/then/else 语句
先举个栗子呗~...
分类:
系统相关 时间:
2015-01-04 23:05:48
阅读次数:
287
var len = $("#b span").length, curindex = 0;$("#leftRun").click(function(){ if(curindex) { curindex--; }else{ return; } $("#b").animate({ le...
分类:
Web程序 时间:
2015-01-04 21:00:43
阅读次数:
226
var http = require(‘http‘);
function fib (n) {
if (n < 2) {
return 1;
} else {
return fib(n - 2) + fib(n - 1);
}
}
var server = http.createServer(function (req, res) {...
分类:
系统相关 时间:
2015-01-04 19:48:44
阅读次数:
179
if 语句通过关系运算符判断表达式的真假来决定执行哪个分支。Shell 有三种 if ... else 语句:if ... fi 语句;if ... else ... fi 语句;if ... elif ... else ... fi 语句。1) if ... else 语句if ... else ...
分类:
系统相关 时间:
2015-01-04 18:33:08
阅读次数:
207
一: 页面 1: 保存 buttonSave(0) //禁止连续点击。 setDisabe('save', 1); setDisable(item, value) if ( 1== value || '1' == value) item.disabled = true else false. //w...
分类:
其他好文 时间:
2015-01-04 16:55:52
阅读次数:
144
①where 子句里面根据传入参数 决定使用哪一个条件 SQL> select 1 from dual where decode(1,1,1,0)=1; SQL> select 1 from dual where (case when 1=1 then 1 else 0 end) = 1;
分类:
数据库 时间:
2015-01-04 15:08:06
阅读次数:
147
C#中的预处理器指令目录1.#define 和 #undef2.#if、#elif、#else 和#endif3.#warning 和 #error4.#region 和#endregion5.#line6.#pragma C#中有许多名为“预处理器指令”的命令。这些命令从来不会转化为可执行代码中....
Objective C基础目录概述——对Objective C的理解if和else if的区别概述——对Objective C的理解if和else if的区别if( )... if( )... 两个if语句都会执行if( )... else if( )... 如果第一个if判断为true,则else...
分类:
其他好文 时间:
2015-01-04 09:54:43
阅读次数:
186
";echo "";}}//添加语句else{//echo "此组合已经存在!"; echo""; }//include("../ini/inid.php");} ?>
分类:
Web程序 时间:
2015-01-04 09:47:46
阅读次数:
155
//开启和关闭样式表function disableStylesheet(ss){ if(typeof ss == 'number'){ document.styleSheets[ss].disabled = true; }else{ var sheets =...
分类:
Web程序 时间:
2015-01-03 11:51:14
阅读次数:
194