User-1838255255 posted
Hi wmec,
According to your description, if you want to align tag a at the center of the td, please check the following sample code:
<script>
var house_id = "111";
var line = "<table style='border:1px solid red;width:200px;'><tr><td style='text-align:center;'><a href='#' class='btnDelete' style='text-align:center;' data-house-id='" + house_id + "'>删除记录</a></td></tr></td>";
document.write(line);
</script>
Result:

Best Regards,
Eric Du