Results 1 to 3 of 3
Thread: javascript .
Hybrid View
-
25th August 2012 14:31 #1Registered User
Join Date: Mar:2005
Location: Sofia
Posts: 166
javascript .
, :
<body onload="Display()">
<script type="text/javascript">
var seconds = 20;
function Display()
{
while (seconds > 0)
{
document.write(" " ,seconds, " seconds passed<br>");
seconds = seconds - 1;
setInterval ("Display()", 1000);
}
}
</script>
</body>
20 1 1 , , setInterval . ?
-
25th August 2012 17:13 #2Registered User
Join Date: Jul:2006
Location:
Posts: 1,071
Code:<body onload="Display()"> <script type="text/javascript"> var seconds = 20; function Display() { // while (seconds > 0) { document.write(" " ,seconds, " seconds passed<br>"); seconds = seconds - 1; if (seconds > 0) { window.setTimeout(Display, 1000); } // } } </script> </body>
-
25th August 2012 18:16 #3Registered User
Join Date: Mar:2005
Location: Sofia
Posts: 166
.




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in