For loop for lines : For : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » For »

 

For loop for lines



<html>
<head>
<script language="JavaScript">
<!--
function testLoop() {
  var String1 = '<hr align="center" width=';
  document.open();
  for (var size = 5; size <= 100; size+=5)
      document.writeln(String1 + size + '%">');
  document.close();
}
//-->
</script>
</head>
<body>
<form>
<input type="button" value="Test the loop" onClick="testLoop()">
</form>
</body>
</html>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» For