Use do-while loop and prompt dialog to read user input : Do While : Statement JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Statement » Do While »

 

Use do-while loop and prompt dialog to read user input

















<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
do
{
    sometext = prompt("Enter some text","");
}
while (sometext == "");
alert(sometext);
//  -->
</script>
</head>
<body>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Statement
» Do While