Home  >  Article  >  Web Front-end  >  Example analysis of JavaScript implementation of 99 multiplication table

Example analysis of JavaScript implementation of 99 multiplication table

黄舟
黄舟Original
2017-09-22 09:30:081486browse

This article mainly introduces the relevant information of using JavaScript to implement a small program 99 multiplication table. Friends who need it can refer to it

No more nonsense, I will directly post the code for you, the specific code As shown below:


<!DOCTYPE html>
 <html>
 <head>
 <title>99乘法表</title>
 <meta charset="utf-8">
 </head>
 <body>
 <script type="text/javascript">
  
 for (var i = 1; i <= 9; i++) {
 for (var j = 1; j <= i; j++) {
 document.write(i+&#39;*&#39;+j+&#39;=&#39;);
 document.write(i*j+&#39; &#39;);
 }
 document.write("<br/>");
 }
 </script>
 </body>
 </html>

The rendering is as follows:

Summarize

The above is the detailed content of Example analysis of JavaScript implementation of 99 multiplication table. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn