1
我正在使用Bootbox显示模式。Bootbox在表格外移动DIV标签
使用JS,我创建一个字符串作为消息:
display = "<b>Notes</b>";
display += "<br><br>";
display += "<table class='table' id='notes-table'>";
display += "<div>";
display += "<tr><td>";
display += "...";
display += "</td></tr>";
display += "</div>";
display += "</table>";
然后我打电话模态:
bootbox.alert({
message: display,
buttons: {
ok: {
label: 'Close'
}
}
//Example.show("Hello world callback");
});
记录display
在控制台中,我得到:
<b>Notes</b><br><br><table class='table' id='notes-table'><div><tr><td>...</td></tr></div></table>
但是,当我检查DOM时,我得到:
<b>Notes</b>
<br>
<br>
<div></div>
<table class='table' id='notes-table'>
<tbody>
<tr>
<td>...</td>
</tr>
</tbody>
</table>
为什么DIV
标签不再包装表格?