Ninety-nine multiplication table (sample code)

I believe that many of us have seen the ninety-nine multiplication table, so how did this pattern come out? The following blogger has written some codes for you. Babies who want to try this pattern can type it according to the code of the blogger!

<!DOCTYPE

<html lang="en">

<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
table{
width: 80%; }     td{ height: 24px; border:1px solid red;         border-collapse: collapse;         margin: 0 auto;} </style> <script type="text/javascript"> document.write('<table>'); for(var a=1;a<=9;a++){ document.write('<tr>'); for(var b=1;b<=a;b++){ document.write('<td>'); document.write(b+'*'+a+'='+a*b); document.write('</td>'); } document.write('</tr>'); } document.write('</table>'); </script>


   
   
















</head>
<body> </body> </html>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325638851&siteId=291194637