Remember when I first touch JS time, see the video teacher wrote a 99 multiplication table, feel good magic, but he wrote in the following half a day or there are various problems, very annoying ah. Now see the garden of the multiplication table in the blog post, out of the past and the memory, so rewrite it again.
<script>
Write (' <table> ');
for (var i = 1;i<10;i++) {
Write (' <tr> ')
for (Var j =1;j<=i;j++) {
Write (' <td> ' +j+ ' * ' +i+ ' = ' +j*i+ ' </td> ');
}
Write (' </tr> ');
}
Write (' </table> ');
function write (node) {
document.write (node);
}
</script>
Although it is still a little white, but it is much better than the original. Here allow me to spit a groove, that is the front end of the knowledge is too vast, a bit of people can not see the side, but perhaps this has been unremitting exploration is the front-end even programming charm and soul!
Remember the beginner JS time to practice a 99 multiplication table is written desperate