Do Until Loop [英] Do Until Loop
问题描述
您好,
我想知道是否可以在Javascript中使用Do until循环。我有一个
数组,想要用用户详细信息填充数组10次,直到
达到10或者按下取消。我正在使用window.prompt获取
用户信息。任何建议。
请{
//要求用户输入他们的详细信息
} while(myairline!= 10);
shannon于2005年5月25日在comp.lang.javascript中写道 :
< blockquote class =post_quotes>你好,
我想知道是否可以在Javascript中使用Do until循环。我有一个
数组,想要用用户的详细信息填充数组10次,直到它达到10或者按下取消。我正在使用window.prompt来获取用户信息。任何建议。
在{myairline!= 10)的时候{
//要求用户输入他们的详细信息
};
否
-
Evertjan。
荷兰。
(用我的电子邮件地址替换所有带点的十字架)
shannon写道:
做{
//要求用户输入他们的详细信息
} while(myairline!= 10);
JS是区分大小写的。 `do''而不是'Do''工作正常。
从中学习:
var i = 10;
do
{
alert(i);
}
while(--i) ;
PointedEars
Thomas''PointedEars''Lahn于2005年5月25日在comp.lang.javascript上写道 :
shannon写道:
在{myairline时,请{
//要求用户输入他们的详细信息
} != 10);
JS是区分大小写的。 `do''而不是'Do''工作正常。
从中学习:
var i = 10;
做
{
alert(i);
}
while(--i);
do
alert( ''只有一次'')
而(假);
非常实用!
-
Evertjan。
荷兰。
(用我的电子邮件地址替换所有带点的十字架)
Hello,
I am wondering if a Do until loop can be used in Javascript. I have an
array and want to fill the array 10 times with the users details until
it reaches 10 or if they press cancel. I''m using window.prompt to get
user info. Any suggestions.
Do {
//ask user to input their details
} while (myairline !=10);
shannon wrote on 25 nov 2005 in comp.lang.javascript:
Hello,
I am wondering if a Do until loop can be used in Javascript. I have an
array and want to fill the array 10 times with the users details until
it reaches 10 or if they press cancel. I''m using window.prompt to get
user info. Any suggestions.
Do {
//ask user to input their details
} while (myairline !=10);
no
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)
shannon wrote:
Do {
//ask user to input their details
} while (myairline !=10);
JS ist case-sensitive. `do'' instead of `Do'' works OK.
Learn from this:
var i = 10;
do
{
alert(i);
}
while (--i);
PointedEars
Thomas ''PointedEars'' Lahn wrote on 25 nov 2005 in comp.lang.javascript:
shannon wrote:Do {
//ask user to input their details
} while (myairline !=10);
JS ist case-sensitive. `do'' instead of `Do'' works OK.
Learn from this:
var i = 10;
do
{
alert(i);
}
while (--i);
do
alert(''only once'')
while (false);
Very useful!
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)
这篇关于Do Until Loop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!