【发布时间】:2017-08-03 21:43:09
【问题描述】:
我正在尝试使用 dojo 对话框小部件创建一个显示文本和图像的对话框,每当我通过 innerhtml 传递图像详细信息时,文本或图像都不会出现弹出窗口。
它适用于文本细节,但不显示图像细节。我在下面包含了我的代码:
HTML:
<div data-dojo-type="dijit.Dialog" title="SUB Details"
style="width: 500px; height: 150px; display:none;
id="subDetailDialog"
data-dojo-id="kycDetailDialog">
<br>
<table border ='0px' align='center' width='400' class='detailedInfo' id='detailedInfo' >
<tr class='even'>
<td style="width:40%"><strong>First Name</strong></td><td><strong>:</strong></td>
<td id='firstNameRow' style="width:40%"></td>
</tr>
<tr class='odd'>
<td><strong>Date of birth</strong></td><td><strong>:</strong></td>
<td id='dobRow'></td>
</tr>
<tr class='even'>
<td><strong>Subscriber Image</strong></td><td><strong>:</strong></td>
<td id='imgRow'></td>
</tr>
</table>
</div>
Javascript:
dojo.byId("firstNameRow").innerHTML = data.firstName;
dojo.byId("dobRow").innerHTML = data.dob;
dojo.byId("imgRow").innerHTML = '<img src="/images/123456789_.jpg" border="0" width="32" height="32"/>';
subDetailDialog.show();
【问题讨论】:
标签: javascript html dojo dijit.dialog