摘要:
JS的函数 函数是一个可以重用的代码快,当一个事件出发或者函数本上被调用的时候。 怎么来调用一个函数呢? By pressing the button, a function will be called. The function will alert a message. 给一个函数传参数,并在函数中应用他,在下面有两个例子, ... 阅读全文
posted @ 2007-01-21 23:09
lxsohu
阅读(179)
评论(0)
推荐(0)
摘要:
JS操作符,! 逻辑操作符号 && and x=6y=3 (x 1) returns true || or x=6y=3 ... 阅读全文
posted @ 2007-01-21 11:51
lxsohu
阅读(230)
评论(0)
推荐(0)
摘要:
SWIYCH语句,是条件语句中的一种,具体写法给出一个例子, 用法:如果你必须在多个块中选择执行一个特定块,那么SWITCH语句是最好的, 1 2 3 2122This JavaScript will generate a different greeting based on what day it is. Note that Sunday=0, Monday=1, Tuesday=2, ... 阅读全文
posted @ 2007-01-21 11:28
lxsohu
阅读(210)
评论(0)
推荐(0)
摘要:
JS IF.....ELSE语句 条件语句在JS中用于在不同的条件下执行特定的语句块的语句, 下面的例子分别演示如何写一个IF语句,IF...ELSE语句,IF..ELSE IF...ELSE 语句,还有一个随机链接的例子,代码如下 一 This example demonstrates the If statement. If the time on your b... 阅读全文
posted @ 2007-01-21 11:23
lxsohu
阅读(243)
评论(0)
推荐(0)
摘要:
JS变量, 变量是一个你要存储信息的容器。 例子: This example declares a variable, assigns a value to it, and then displays the variable. Then the variable is displayed one more time, only this time as a heading. ... 阅读全文
posted @ 2007-01-21 11:06
lxsohu
阅读(186)
评论(0)
推荐(0)