JS splicing html cannot be displayed

There is a problem with the splicing of the

string. Press F12 and the following

occurs
var fpsxArray =  JSON.parse(fpsxArrayStr);//json
          var i;
        
          var html="<table >";
          for(i=0;i<fpsxArray.length;iPP){
              html+="<tr>"+
                  ""+
                  "</tr>";
          }        
          html+="</table>";
          $("-sharptest").append(html);

Front desk code

var fpsxArray =  JSON.parse(fpsxArrayStr);//json
          var i;
        
          var html="<table >";
          for(i=0;i<fpsxArray.length;iPP){
              html+="<tr>"+
                  "<c:if test=""+${fpsxArray[i] == pd.project[i]}+"">"+
                 "<input name="checkboxfpsx_"+fpsxArray[i].PPID+"" id="checkboxfpsx_"+fpsxArray[i].PPID+"" value=""+fpsxArray[i].PROJECT+""  checked="checked" type="checkbox"/> <span class="lbl">"+fpsxArray[i].PROJECT+
                 "</c:if>"+
                  "</tr>";
          }        
          html+="</table>";
          $("-sharptest").append(html);
      
Mar.22,2021

I don't know if I read it wrong and didn't see td


table tags must be nesting reasonably or there will be problems in parsing


is it wrong for me to use js to circularly concatenate jsp tags ~


html+="<tr>"+
(fpsxArray[i] == pd.project[i] ? 
    "<input name='checkboxfpsx_"+fpsxArray[i].PPID+"' id='checkboxfpsx_"+fpsxArray[i].PPID+"' value='"+fpsxArray[i].PROJECT+"'  checked='checked' type='checkbox'/> <span class='lbl'>"+fpsxArray[i].PROJECT+ "</span>"
: "") +
  "</tr>";
Menu