这是我的代码。当我去添加“deleteitem”类时,它给了我一个语法错误,但我不知道如何纠正它
<script type="text/javascript">
$(document).ready(function () {
var url = "db-get.php";
$("#userdata tbody").html("");
$.getJSON(url, function (data) {
$.each(data.orders, function (i, order) {
var tblRow =
"<tr id=" + order.id + ">" + "<td>" + order.id + "</td>" + "<td>" + order.Name + "</td>" + "<td>" + order.Company + "</td>" + "<td>" + order.Phone + "</td>" + "<td>" + order.Location + "</td>" + "<td><button class="deleteitem">Delete</button></td>" + "</tr>";
$(tblRow).appendTo("#userdata tbody");
});
});
});
</script>