Home  >  Article  >  Web Front-end  >  How to create multiplication table using JS

How to create multiplication table using JS

php中世界最好的语言
php中世界最好的语言Original
2018-04-18 10:10:012528browse

This time I will bring you the method of making multiplication table with JS. What are the notes for making the multiplication table with JS. Here is a practical case. Let’s take a look. one time.

Without further ado, I will post the code directly for you. The specific code is as follows:

<!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>

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the PHP Chinese website!

Recommended reading:

How vue proxyTable implements interface cross-domain request debugging

How to operate the mongodb database in Node.js

The above is the detailed content of How to create multiplication table using JS. 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