Home > Web Front-end > JS Tutorial > body text

JavaScript implements 99 multiplication table code

小云云
Release: 2018-02-07 13:04:29
Original
5499 people have browsed it

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


<!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>
Copy after login

The renderings are as follows:

##Related recommendations:

An example of using double-layer loops to implement multiplication tables in PHP

JavaScript loop practice methods of printing triangles, factorials, and multiplication tables

shell script Implemented multiplication table example

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!