亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? stmts.html

?? 一個(gè)經(jīng)典的例子
?? HTML
字號(hào):
<HTML>
<body background="ee.jpg">

<P>
<A NAME="statements"><H1>JavaScript 的語法</H1></A>

<P>JavaScript statements consist of keywords used with the appropriate syntax. A single statement may span multiple lines. Multiple statements may occur on a single line if each statement is separated by a semi-colon.

<P><B>Syntax conventions</B>: All keywords in syntax statements are in bold. Words in italics represent user-defined names or statements. Any portions enclosed in square brackets, i.e. [ and ], are optional.
<TT>{<I>statements</I>}</TT> indicates a block of statements, which can consist of a single statement or multiple statements delimited by a curly braces.

<P>The following statements are available in JavaScript:
<TABLE width=70%>
<TR>
<TD>
<LI><A HREF=#break_statement>break</A>
<LI><A HREF=#comment_statement>comment</A>
<LI><A HREF=#continue_statement>continue</A>
<LI><A HREF=#for_statement>for</A>
<LI><A HREF=#for_in_statement>for...in</A>
<LI><A HREF=#function_statement>function</A>
</TD>
<TD>
<LI><A HREF=#if_else_statement>if...else</A>
<LI><A HREF=#return_statement>return</A>
<LI><A HREF=#var_statement>var</A>
<LI><A HREF=#while_statement>while</A>
<LI><A HREF=#with_statement>with</A>
</TD>
</TR>
</TABLE>


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="break_statement"><H2>break statement</H2></A>

<P>The <B>break</B> statement terminates the current <B>while</B> or <B>for</B> loop and transfers program control to the statement following the terminated loop. 


<H3>Syntax</H3>
<PRE><B>break</B></PRE>


<H3>Examples</H3>
<P>The following function has a <B>break</B> statement that terminates the <B>while</B> loop when i is 3, and then returns the value 3 * x. 
<PRE>function func(x) { 
    var i = 0; 
    while (i &lt 6) { 
        if (i == 3)  
            break;
        i++;
    }
    return i*x; 
} 
</PRE>


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="comment_statement"><H2>comment statement</H2></A>

<P>Comments are notations by the author to explain what the script does, and they are ignored by the interpreter. JavaScript supports Java-style comments:
<LI>Comments on a single line are preceded by a double-slash (//).
<LI>Comments that span multiple lines are preceded by a /* and followed by a */. 


<H3>Syntax</H3>
<PRE>1. // <I>comment text</I> 
2. /* <I>multiple line comment text </I>*/</PRE> 


<H3>Examples</H3>
<PRE>// This is a single-line comment.

<BR>/* This is a multiple-line comment. It can be of any length, and 
you can put whatever you want here. */</PRE> 


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="continue_statement"><H2>continue statement</H2></A>

<P>The <B>continue</B> statement terminates execution of the block of statements in a <B>while</B> or <B>for</B> loop, and continues execution of the loop with the next iteration. In contrast to the break statement, it does not terminate the execution of the loop entirely: instead,
<UL>
<LI>In a <B>while</B> loop it jumps back to the <I>condition</I>. 
<LI>In a <B>for</B> loop it jumps to the <I>update</I> expression.
</UL>


<H3>Syntax</H3>
<PRE><B>continue</PRE></B> 


<H3>Examples</H3>
<P>The following example shows a while loop that has a continue statement that executes when the value of i is 3. Thus, n takes on the values 1, 3, 7, and 12. 
<P>
<PRE>i = 0; 
n = 0; 
while (i &lt 5) { 
    i++; 
    if (i == 3) 
        continue;  
    n += i;
} 
</PRE>


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="for_statement"><H2>for statement</H2></A>
<P>
A <B>for</B> loop consists of three optional expressions, enclosed in parentheses and separated by semicolons, followed by a block of statements executed in the loop. The parts of the for statement are:
<UL>
<LI>
The <I>initial expression</I>, generally used to initialize a counter variable. This statement may optionally declare new variables with the <TT>var</TT> keyword. This expression is optional.
<LI>
The <I>condition</I> that is is evaluated on each pass through the loop. If this condition is true, the statements in the succeeding block are performed. This conditional test is optional. If omitted, then the condition always evaluates to true.
<LI>
An <I>update expression</I> generally used to update or increment the counter variable. This expression is optional.
<LI>
A block of statements that are executed as long as the <I>condition</I> is true. This can be a single statement or multiple statements. Although not required, it is good practice to indent these statements four spaces from the beginning of the for statement.
</UL>


<H3>Syntax</H3>
<PRE><B>for</B> ([initial expression]; [condition]; [update expression]) {
    statements
}
initial expression = statement | variable declartion
</PRE>


<H3>Examples</H3>
<P>
This simple for statement starts by declaring the variable i and initializing it to zero. It checks that i is less than nine, and performs the two succeeding statements, and increments i by one after each pass through the loop.
<PRE>
for (var i = 0; i < 9; i++) { 
    n += i;

    myfunc(n);
}
</PRE>


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="for_in_statement"><H2>for...in statement</H2></A>
<P>The <B>for</B> statement iterates variable <I>var</I> over all the properties of object <I>obj</I>. For each distinct property, it executes the statements in <I>statements</I>.


<H3>Syntax</H3>
<PRE><B>for</B> (var <B>in</B> obj) { 
    <I>statements</I> }</PRE> 


<H3>Examples</H3>
<P>The following function takes as its argument an object and the object's name. It then iterates over all the object's properties and returns a string that lists the property names and their values.
<PRE>function dump_props(obj, obj_name) { 
    var result = "", i = "";
    for (i in obj)
        result += obj_name + "." + i + " = " + obj[i] + "\n";
    return result;
} </PRE>


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="function_statement"><H2>function statement</H2></A>

<P>The <B>function</B> statement declares a JavaScript function <I>name</I> with the specified parameters <I>param</I>. To return a value, the function must have a <B>return</B> statement that specifies the value to return. You cannot nest a function statement in another statement or in itself.

<P>All parameters are passed to functions, <I>by value</I>. In other words, the value is passed to the function, but if the function changes the value of the parameter, this change is not reflected globally or in the calling function.


<H3>Syntax</H3>
<PRE><B>function</B> <I>name</I>([<I>param</I>] [, <I>param</I>] [..., <I>param</I>]) {
    <I>statements </I>}</PRE> 


<H3>Examples</H3>
<PRE>//This function returns the total dollar amount of sales, when 
//given the number of units sold of products a, b, and c.
function calc_sales(units_a, units_b, units_c) {
    return units_a*79 + units_b*129 + units_c*699
}</PRE>


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="if_else_statement"><H2>if...else statement</H2></A>

<P>The <B>if...else</B> statement is a conditional statement that executes the statements in <I>statements</I> if <I>condition</I> is true. In the optional <B>else</B> clause, it executes the statements in <I>else statements</I> if <I>condition</I> is false. These may be any JavaScript statements, including further nested <B>if</B> statements.


<H3>Syntax</H3>
<PRE><B>if</B> (<I>condition</I>) {
    <I>statements</I>
} [<B>else</B> {
    <I>else statements</I>
}]</PRE> 


<H3>Examples</H3>
<PRE>if ( cipher_char == from_char ) {
    result = result + to_char; 
    x++
} else  
    result = result + clear_char; 
 </PRE>


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="return_statement"><H2>return statement</H2></A>
<P>The <B>return</B> statement specifies the value to be returned by a function. 


<H3>Syntax</H3>
<PRE><B>return</B> <I>expression</I>;</PRE> 


<H3>Examples</H3>
<P>The following simple function returns the square of its argument, x, where x is an number.
<PRE>function square( x ) { 
    return x * x; 
} </PRE>


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="var_statement"><H2>var statement</H2></A>

<P>The <B>var</B> statement declares a variable <I>varname</I>, optionally initializing it to have <I>value</I>. The variable name <I>varname</I> can be any legal identifier, and <I>value</I> can be any legal expression. The scope of a variable is the current function or, for variables declared outside a function, the current application. 
<P>
Using <B>var</B> outside a function is optional; you can declare a variable by simply assigning it a value. However, it is good style to use <B>var</B>, and it is neccessary in functions if there is a global variable of the same name. So, in general, it is a good idea to always use <B>var</B>, but you should definitely use it when declaring a local variable in a function, to ensure that any global variable of the same name does not override it.


<H3>Syntax</H3>
<PRE><B>var</B> <I>varname</I> [= <I>value</I>] [..., <I>varname</I> [= <I>value</I>] ]
</PRE> 


<H3>Examples</H3>
<P><TT>var num_hits = 0, cust_no = 0</TT> 


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="while_statement"><H2>while statement</H2></A>

<P>The <B>while</B> statement is a loop that evaluates the expression <I>condition</I>,and if it is true, executes <I>statements</I>. It then repeats this process, as long as condition is true. When <I>condition</I> evaluates to false, execution continues with the next statement following the <I>statements</I>.
<P>
Although not required, it is good practice to indent the statements a <B>while</B> loop four spaces from the beginning of the for statement.


<H3>Syntax</H3>
<PRE><B>while</B> (<I>condition</I>) {
    <I>statements</I>
}
</PRE> 


<H3>Examples</H3>
<P>The following simple <B>while</B> loop iterates as long as n is less than three. Each iteration, it increments n and adds it to x. Therefore, x and n take on the following values 
<UL>
<LI>After first pass: x = 1 and n = 1 
<LI>After second pass: x = 2 and n = 3 
<LI>After third pass: x = 3 and n = 6 </UL>

<P>After completing the third pass, the condition n &lt 3 is no longer true, so the loop terminates.
<PRE>n = 0; 
x = 0; 
while( n &lt 3 ) { 
    n ++; x += n; 
} </PRE>


<!------------------------------------------------------------------------------------------------->
<HR>
<A NAME="with_statement"><H2>with statement</H2></A>

<P>The <B>with</B> statement establishes <I>object</I> as the default object for the <I>statements</I>. 
Any property references without an object are then assumed to be for <I>object</I>.
Note that the parentheses are required around <I>object</I>.


<H3>Syntax</H3>
<PRE><B>with</B> <I>(object)</I>{ 
     <I>statements</I> 
}</PRE> 


<H3>Examples</H3>
<PRE>
with (Math) { 
    a = PI * r*r
    x = r * cos(theta)
    y = r * sin(theta) 
}
</PRE> 

<!------------------------------------------------------------------------------------------------->
<hr>
<p align=center><a href=./index.htm>[返回]</a></p>
</BODY>
</HTML>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩高清一区| 麻豆精品新av中文字幕| 亚洲丶国产丶欧美一区二区三区| 午夜成人免费视频| 极品少妇xxxx精品少妇| 97精品视频在线观看自产线路二| 日本久久电影网| 666欧美在线视频| 国产亚洲综合色| 亚洲精品日产精品乱码不卡| 天堂影院一区二区| 国产成人综合网站| 欧美午夜不卡视频| 久久精品视频免费| 亚洲一区二区三区精品在线| 国内精品在线播放| 色天天综合色天天久久| 日韩欧美另类在线| 亚洲狠狠丁香婷婷综合久久久| 五月开心婷婷久久| 国产99久久久久久免费看农村| 在线免费不卡电影| 久久久亚洲精品石原莉奈| 亚洲一级电影视频| 国产高清久久久| 欧美精品国产精品| 国产精品日日摸夜夜摸av| 亚洲v中文字幕| 99re热视频精品| 精品久久久久久久久久久久久久久| 亚洲人成影院在线观看| 韩国av一区二区三区四区| 欧美少妇一区二区| 国产精品久久久久影院色老大| 日本亚洲三级在线| 欧美最猛性xxxxx直播| 国产三级久久久| 日本欧洲一区二区| 在线免费观看日本一区| 国产精品久久久久天堂| 精品在线播放免费| 欧美老女人第四色| 亚洲黄色性网站| 成人国产在线观看| 2023国产精品| 蜜臀av性久久久久蜜臀aⅴ| 欧美性一区二区| 日韩毛片在线免费观看| 国产麻豆精品视频| 欧美电视剧在线观看完整版| 亚洲成人免费电影| 欧美亚洲另类激情小说| 中文字幕日本不卡| 成人丝袜18视频在线观看| 欧美精品一区二区三区视频 | 欧美久久免费观看| 亚洲色图另类专区| 波多野结衣中文字幕一区| 2020国产成人综合网| 日本不卡一二三区黄网| 欧美日韩国产综合草草| 亚洲最大的成人av| 欧美在线不卡视频| 亚洲综合在线五月| 色爱区综合激月婷婷| 一区二区三区在线看| 97aⅴ精品视频一二三区| 中文av字幕一区| 99热国产精品| 综合激情成人伊人| 色哦色哦哦色天天综合| 亚洲精品视频自拍| 91福利在线导航| 亚洲电影一区二区三区| 欧美三级日本三级少妇99| 亚洲一区二区三区不卡国产欧美| 在线观看亚洲a| 亚洲综合自拍偷拍| 欧美美女激情18p| 三级不卡在线观看| 日韩亚洲欧美在线| 美女视频一区二区| 久久网这里都是精品| 国产成人在线观看免费网站| 国产女人18毛片水真多成人如厕| 高清国产一区二区| 中文字幕一区二| 一本到三区不卡视频| 亚洲一区二区三区中文字幕| 欧美精品成人一区二区三区四区| 日韩高清一区在线| 精品成人在线观看| 成人黄色在线视频| 亚洲男同性恋视频| 欧美日韩在线电影| 老司机精品视频导航| 久久日一线二线三线suv| 成人污视频在线观看| 一区二区三区四区视频精品免费| 欧美日韩中文一区| 麻豆国产一区二区| 国产精品美女久久久久久2018| 97久久精品人人做人人爽| 午夜视频在线观看一区| 精品国产成人在线影院 | 亚洲国产精华液网站w| 色婷婷综合在线| 视频一区二区中文字幕| 久久综合国产精品| 91视频精品在这里| 日韩极品在线观看| 久久精品一级爱片| 欧洲一区在线观看| 九九国产精品视频| 亚洲三级小视频| 91精品国产91久久综合桃花| 成人性生交大合| 亚洲高清视频在线| 久久精品一区二区三区av| 欧洲人成人精品| 国产一区二区精品在线观看| 亚洲男人的天堂网| 精品少妇一区二区三区在线播放| 成人国产精品免费网站| 免费欧美在线视频| 日韩理论片在线| 日韩精品一区二区三区中文精品| k8久久久一区二区三区 | 日韩免费性生活视频播放| 国产69精品久久久久777| 亚洲国产美国国产综合一区二区| 久久亚洲二区三区| 欧美性三三影院| 国产成人在线网站| 免费三级欧美电影| 亚洲欧美偷拍另类a∨色屁股| 亚洲精品一区二区三区影院 | 亚洲电影第三页| 国产精品天天看| 日韩欧美一区二区不卡| 中文字幕+乱码+中文字幕一区| 欧美精品乱码久久久久久| 99久久国产综合精品色伊| 国产综合色在线| 五月婷婷久久丁香| 亚洲视频中文字幕| 久久精品欧美日韩精品| 在线播放亚洲一区| 91小视频免费观看| 国产精品亚洲一区二区三区在线| 午夜精品久久久久久久久久久| 亚洲欧美在线aaa| 久久久亚洲高清| 日韩欧美一级二级| 67194成人在线观看| 日本韩国视频一区二区| 成人美女在线观看| 国产在线精品免费av| 日本欧美一区二区三区乱码| 亚洲国产一区二区a毛片| 欧美精品一区二区精品网| 欧美丰满少妇xxxxx高潮对白| 色8久久精品久久久久久蜜| 99精品黄色片免费大全| 国产一区二三区好的| 老司机免费视频一区二区三区| 成人欧美一区二区三区| 在线成人av影院| 五月天欧美精品| 欧美国产日本韩| 欧美一卡二卡在线| 在线观看www91| 91麻豆国产自产在线观看| 水蜜桃久久夜色精品一区的特点| 欧美日韩精品欧美日韩精品| 国产日韩三级在线| 久久久一区二区三区捆绑**| 日韩一区二区三区电影在线观看 | 亚洲精品午夜久久久| 亚洲免费在线视频| 亚洲欧美一区二区久久| 亚洲欧美另类综合偷拍| 最近日韩中文字幕| 国产精品国模大尺度视频| 国产精品乱码一区二区三区软件| 国产视频一区二区在线观看| 久久精品日产第一区二区三区高清版| 26uuu精品一区二区在线观看| 精品久久久久久综合日本欧美| 日韩精品一区二区三区四区| 精品精品国产高清a毛片牛牛| 欧美xxxxxxxxx| 久久免费看少妇高潮| 国产亚洲福利社区一区| 日韩欧美一级精品久久| 久久久久久亚洲综合| 国产精品理论片在线观看| 亚洲色图视频网站| 亚洲成人av免费| 久久精品国内一区二区三区 |