Difference between revisions of "JavaScript: Exemplo de uso do for"
From AdonaiMedrado.Pro.Br
(New page: <code language="html"> <html> <head> <title>Minha Pagina</title> </head> <body> <script> var i = 0; while(i<10) { document.write("<input type=\"text\" id=\"txtTeste" + i + "...) |
|||
Line 1: | Line 1: | ||
− | <code | + | <code lang="html"> |
<html> | <html> | ||
<head> | <head> | ||
− | <title> | + | <title></title> |
+ | <style></style> | ||
</head> | </head> | ||
<body> | <body> | ||
<script> | <script> | ||
− | var i | + | var i; |
− | + | for (i=0;i<10;i++) | |
− | + | alert("Eu sou a caixa chata " + (i + 1)); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> | ||
</code> | </code> |