• 九九乘法表



        ////九九乘法表for循环
        //var oDiv = document.getElementById('nine');
        //for (var nFirstNum = 1; nFirstNum < 10; nFirstNum++) {
        //    for (var nSecNum = 1; nSecNum <=nFirstNum; nSecNum++) {
        //        oDiv.innerHTML += nFirstNum + '*' + nSecNum + '=' + nFirstNum * nSecNum + '&nbsp;&nbsp;&nbsp;'
        //  }
        //    oDiv.innerHTML += '<br/>';
        //    oDiv.style.border='1px solid #f00'
        //}


        ////while是先判断循环条件,再循环
        //var oDiv = document.getElementById('nine');
        //var nFirstNum = 1;
        //while (nFirstNum < 10) {
        //    var nSecNum = 1;
        //    while (nSecNum <= nFirstNum) {
        //        oDiv.innerHTML += nFirstNum + '*' + nSecNum + '=' + nFirstNum * nSecNum + '&nbsp;&nbsp;&nbsp;'
        //        nSecNum++;
        //    }
        //    oDiv.innerHTML += '<br/>'
        //    nFirstNum++;
        //    oDiv.style.border = '1px solid #ccc'
        //}


        ////而do-while则是先执行后判断.
        //var oDiv = document.getElementById('nine');
        //var nFirstNum = 1;
        //do {
        //    var nSecNum = 1;
        //    do {
        //        oDiv.innerHTML += nFirstNum + '*' + nSecNum + '=' + nFirstNum * nSecNum + '&nbsp;&nbsp;&nbsp;'
        //        nSecNum++;
        //        } while (nSecNum <= nFirstNum)
        //    oDiv.innerHTML +='<br/>'
        //    nFirstNum++;
        //    oDiv.style.border='1px solid #ccc'
        //} while (nFirstNum < 10)


     

  • 相关阅读:
    面向对象编程的三大特征: 封装、继承、多态
    CDH和HDP对比
    mapreduce、spark、tez区别
    minio原理和使用
    HDP、CDH、CDP升级
    常用的分布式文件系统
    linux平台下防火墙iptables原理(转)
    php 1207
    php 1209
    php 1130
  • 原文地址:https://www.cnblogs.com/xiaoleidiv/p/3396764.html
Copyright © 2020-2023  润新知