• js动态表格笔记


    var tablereport= document.getElementById('tablereport');
    var logBodyHtml = ' ';
    logBodyHtml += ' <table style=" 100%; "> ';
    logBodyHtml += ' <tbody tabindex="0" > ';
    for(var i=1;i<logData.dataList.length;i++){
    var contentData = logData.dataList[i];
    var currencyQty = contentData.CURRENCYQTY;
    if(currencyQty == null){
    currencyQty =0;
    }
    var trHtml = "";
    trHtml += ' <tr id="yui-rec0" style="font-size:28px;padding-left:100px;" > ';
    trHtml += ' <td rowspan="2" style="text-align: center; 15%; height: 60px;color: #00ff00;font-size: 22px;border:2px dashed #f6cf72;border-right: 0px;border-top: 0px;"> ' + contentData.ITEMNO + " </td>" ;
    trHtml += ' <td rowspan="2" style="text-align: center; 15%; height: 60px;color: #ffff00;font-size: 30px;border:2px dashed #f6cf72;border-right: 0px;border-top: 0px;"> ' + contentData.REQUIREQTY + " </td>" ;
    trHtml += ' <td rowspan="2" style="text-align: center; 15%; height: 60px;color: #00ff00;font-size: 30px;border:2px dashed #f6cf72;border-right: 0px;border-top: 0px;"> ' + contentData.DISPATCHINGQTY + " </td>" ;
    trHtml += ' <td rowspan="2" style="text-align: center; 15%; height: 60px;color: #ff0000;font-size: 30px;border:2px dashed #f6cf72;border-right: 0px;border-top: 0px;"> ' + contentData.LACKQTY + " </td>" ;
    trHtml += ' <td rowspan="2" style="text-align: center; 20%; height: 60px;color: #00ff00;font-size: 26px;border:2px dashed #f6cf72;border-right: 0px;border-top: 0px;"> ' + contentData.UNITNO + " </td>" ;
    trHtml += ' <td style="text-align: center; 20%; height: 60px;color: #00ff00;font-size: 26px;border:2px dashed #f6cf72;border-right: 0px;border-top: 0px;"> '+"绑定:" + contentData.BINDQTY + " </td>" ;
    trHtml += '</tr> ';
    trHtml += '<tr> ';
    trHtml += ' <td style="text-align: center; 20%; height: 60px;color: #00ff00;font-size: 26px;border:2px dashed #f6cf72;border-right: 0px;border-top: 0px;"> ' +"通用:"+ currencyQty + " </td>" ;
    trHtml += '<tr> ';
    logBodyHtml += trHtml;

    }
    // console.log( logBodyHtml );
    logBodyHtml += ' </tbody>' ;
    logBodyHtml += ' </table> ';
    tablereport.innerHTML=logBodyHtml ;

  • 相关阅读:
    按键精灵-3-按键精灵键盘鼠标命令
    Python-13-pass,del和exec
    STP-9-处理RSTP中的拓扑变化
    Python-12-简单推导
    Python-11-循环
    Python-10-条件和条件语句
    Qt qml listview 列表视图控件(下拉刷新、上拉分页、滚动轴)
    Qt qml pageview 左右滑动分页组件
    Qt qml treeview 树控件
    Qt qml 模拟iphone slide to unlock 的聚光动画文字效果
  • 原文地址:https://www.cnblogs.com/26JRS/p/7274384.html
Copyright © 2020-2023  润新知