Can someone help me Why is it not written in the Javascript body definition list? When I debug, the object is and the lines are all implemented. Also, if I use the document. Write, overwrite information page. I'm having trouble adding this HTML to the predefined definition list. There is no error in the console. Any help is appreciated.
Javascript in the head
write the function Gph (obj, chartNum) {var data = obj; {// Loop .innerhtml + = 'for each column of graph document.getElementById (chartNum); (; I & lt; obj.tab1.length i ++ I = 0)'; DT and gt; & Lt '+ data T1 [i] .name + '& lt; / Dt> Document.getElementById (chartNum) .innerhtml + = '& lt; Dd class = "P100" & gt; & Lt; Period & gt; & Lt; P & gt; + Data T1 [i] .top + '& lt; / B & gt; & Lt; / Span & gt; & Lt; / Dd> Document.getElementById (chartNum) .innerhtml + = '& lt; Dd class = "subpic '+ data.tab1 [i] .bot +' '& gt; & gt; duration & gt; & lt; p & gt;' + data.T1 [i] .bot + '& Lt; / b & gt; & lt; / span & gt; & lt; / dd & gt; 'console.log (data.tab1 [i] .top);}} function writeAxis (obj, axisNum) Li (i = 0; I & lt; obj.tab1.length; i ++) {// Loop to create each X-axis label document.getElementById (axisNum) .innerhtml + = '& lt; li & gt; '+ Obj.tab1 [i] .name +' & lt; / li & gt; ';}} function writeTable (obj, tableNum) {document.getElementById (tableNum) .innerhtml +' & lt; tr & gt; Th & gt; Business & lt; / th & gt; & lt; th & gt; Number & lt; / or & gt; & lt; Th & gt; Percent & lt; / v & gt; & lt // // in loop for /; & gt; '; (I = 0; I & lt; obj.tab1.length; i ++) To fill the table information obj.tab1 [i] .botl = math.gol (10000 * (obj.tab1 [i] .num / Obj.tab1 [i] .all)) / 100; Document.getElementById (tableNum) .innerhtml + '' & lt; t & gt; '+ Obj.tab1 [i] .name +' & lt; / td & gt; & lt; td & gt; + Obj.tab1 [i] .num + '& lt; / td> & lt; td & gt;' + Obj.tab1 [i] .botl + '% & lt; / tr & gt;';}} HTML in the body
& lt; ; / Ul & gt; Table id = "table1" & gt; & lt; / table & gt;
It is not .interhtml , it is .internal HTML
Comments
Post a Comment