1. 程式人生 > >jquery 遍歷一維陣列寫入表格

jquery 遍歷一維陣列寫入表格

(0, "$c====Parallel::ForkManager\nesbapp6-esb_in-20180921103924-012169esbapp3-esb_in-20180921104047-016696ansible -i /etc/ansible/hosts  esbapp6 -u esb -m shell -a 'grep -l  esbapp6-esb_in-20180921103924-012169  /app/esb/esblog/in/20180921/*'\nesbapp1-esb_in-20180921104048-017816esbapp2-esb_in-20180921104049-019971esbapp4-esb_in-20180921104049-015856esbapp6-esb_in-20180921104050-014620esbapp4-esb_in-20180921103835-011992ansible -i /etc/ansible/hosts  esbapp6 -u esb -m shell -a 'grep -l  esbapp6-esb_in-20180921104050-014620  /app/esb/esblog/in/20180921/*'\nansible -i /etc/ansible/hosts  esbapp2 -u esb -m shell -a 'grep -l  esbapp2-esb_in-20180921104049-019971  /app/esb/esblog/in/20180921/*'\nansible -i /etc/ansible/hosts  esbapp3 -u esb -m shell -a 'grep -l  esbapp3-esb_in-20180921104047-016696  /app/esb/esblog/in/20180921/*'\nansible -i /etc/ansible/hosts  esbapp4 -u esb -m shell -a 'grep -l  esbapp4-esb_in-20180921104049-015856  /app/esb/esblog/in/20180921/*'\nansible -i /etc/ansible/hosts  esbapp4 -u esb -m shell -a 'grep -l  esbapp4-esb_in-20180921103835-011992  /app/esb/esblog/in/20180921/*'\nansible -i /etc/ansible/hosts  esbapp1 -u esb -m shell -a 'grep -l  esbapp1-esb_in-20180921104048-017816  /app/esb/esblog/in/20180921/*'\n10.2.229.102 | SUCCESS | rc=0 >>\n/app/esb/esblog/in/20180921/1300300003215.log\n\n$_==/app/esb/esblog/in/20180921/1300300003215.log\n\n10.2.229.106 | SUCCESS | rc=0 >>\n/app/esb/esblog/in/20180921/1300300003218.log\n\n$_==/app/esb/esblog/in/20180921/1300300003218.log\n\n10.2.229.104 | SUCCESS | rc=0 >>\n/app/esb/esblog/in/20180921/0200200002602.log\n\n$_==/app/esb/esblog/in/20180921/0200200002602.log\n\n10.2.229.101 | SUCCESS | rc=0 >>\n/app/esb/esblog/in/20180921/1300300003214.log\n\n$_==/app/esb/esblog/in/20180921/1300300003214.log\n\n10.2.229.106 | SUCCESS | rc=0 >>\n/app/esb/esblog/in/20180921/1300300000701.log\n\n$_==/app/esb/esblog/in/20180921/1300300000701.log\n\n10.2.229.103 | SUCCESS | rc=0 >>\n/app/esb/esblog/in/20180921/1300300003213.log\n\n$_==/app/esb/esblog/in/20180921/1300300003213.log\n\n10.2.229.104 | SUCCESS | rc=0 >>\n/app/esb/esblog/in/20180921/1300300003216.log\n\n$_==/app/esb/esblog/in/20180921/1300300003216.log\n")
<type 'tuple'>
[21/Sep/2018 02:51:31] "GET /api/generate/?name=ESB%E7%B3%BB%E7%BB%9F&esbserviceflowno=21701020180921010064578159&esbflowno=esbapp4-esb_in-20180921104049-015856 HTTP/1.1" 200 2204

這個是一個2個元素的一維陣列

     $(".gridtable").empty();
               var _HTML="<tr><td>釋出資訊</td></tr>";
               for(var L1=0;L1<jdata.length;L1++){
                     var newArr = jdata[L1];
                     console.log(L1)
                     console.log(newArr);
                     console.log(L1)
                     _HTML =_HTML +'<tr><td>'+ newArr+'</td></tr>'
                    };
                console.log(_HTML);
                $(".gridtable").html(_HTML);
                };