Home >Web Front-end >JS Tutorial >Using JavaScript to implement a small program 99 multiplication tables

Using JavaScript to implement a small program 99 multiplication tables

韦小宝
韦小宝Original
2018-01-15 11:18:272685browse

This article mainly introduces Using JavaScript to implement the 99 multiplication table of a small program. Friends who are interested in JavaScript can refer to this article

Not much nonsense Having said that, I will post the code directly for everyone. The specific code is as follows:

<!DOCTYPE html>
 <html>
 <head>
 <title>www.php.cn 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:

Summary

The above is the 99 multiplication table that the editor introduced to you using JavaScript to implement a small program. I hope it will be helpful to everyone! !

Related recommendations:

Example of JavaScript implementation of mouse wheel control page image switching function

Example of JavaScript implementation of progress bar function based on timer

javascript determines whether the user has operated the page

The above is the detailed content of Using JavaScript to implement a small program 99 multiplication tables. 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