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
標籤不再包裝表格?