私はWebアプリケーションを開発しています。その中で私はポップアップを開くために非常に多くのDivを使用しています。今、私の要件は、そのポップアップの動的Divを作成することであり、そのdivのすべてのコンテンツはデータベースから取得されます。
では、Divをプログラムで動的に作成する方法を教えてもらえますか?
Divのサンプルコード。
<div id="Popup" runat="server" class="hidden-content">
<table width="auto">
<tr>
<td style="font-size: 20px; font-weight: bold; text-align: center;">
<p>
</p>
<b>Diabetes</b>
</td>
</tr>
<tr>
<td style="font-size: 15px; text-align: left;">
<p>
Type I diabetes (also known as juvenile diabetes) is the less common form of diabetes.
It usually is diagnosed during childhood or teen years and requires treatment with
insulin.
</p>
</td>
</tr>
</table>
</div>