Advertisement
RokiAdhytama

While Counter - Chapter 9

Jul 3rd, 2022
728
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html xmlns = "http://www.w3.org/1999/xhtml">
  2.    <head>  
  3.       <title>Counter-Controlled Repetition</title>
  4.  
  5.       <script type = "text/javascript">
  6.          <!--
  7.          var counter = 1;            // initialization
  8.  
  9.          while ( counter <= 7 ) {    // repetition condition
  10.             document.writeln( "<p style = \"font-size: " +
  11.                counter + "ex\">XHTML font size " + counter +
  12.                "ex</p>" );
  13.             ++counter;               // increment
  14.          }
  15.          // -->
  16.       </script>
  17.  
  18.    </head><body></body>
  19. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement