我在控制台中收到以下错误: “未捕获的SyntaxError:意外的标识符”
var sliders_row = "";
sliders_row +="<tr>";
sliders_row +="<td>' + this.id + '</td>";
sliders_row +="<td>' + this.title + '</td>";
sliders_row +="<td>' + this.description + '</td>";
sliders_row +="<td>' + this.image + '</td>";
sliders_row +="<td>' + this.isVisible + '</td>";
sliders_row +="<td class="entry_table_options_container">";
sliders_row +="<i class="fa fa-info-circle" data-id="+ this.id +" data-title="+ this.title +" data-content="+ this.description +" data-image="+ this.image +" title="Ver" style="background-color:#77DD77;"></i>";
sliders_row +="<i class="fa fas fa-pencil-alt " data-id="+ this.id +" data-title="+ this.title +" data-content="+ this.description +" data-image="+ this.image +" title="Editar" style="background-color:#5BC0DE;"></i>";
sliders_row +="<i class="fa far fa-trash-alt " data-id="+ this.id +" data-title="+ this.title +" data-content="+ this.description +" data-image="+ this.image +" title="Borrar" style="background-color:#D9534F;"></i>";
sliders_row +="</td>";
sliders_row +="</tr>";
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
我正在尝试将各种html元素附加到表头并遇到此问题,该错误似乎在此行中:
sliders_row +="<td class="entry_table_options_container">";
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
我似乎找不到任何问题吗?另外,有没有那么省力的方法来添加大量的html元素?