向DOJO对话框添加图像(警报) 发生意外错误 好啊
我可以向dojo对话框添加图像吗?让它看起来像一个警报框或什么的?以上是我目前的代码 差不多向DOJO对话框添加图像(警报) 发生意外错误 好啊,dojo,Dojo,我可以向dojo对话框添加图像吗?让它看起来像一个警报框或什么的?以上是我目前的代码 差不多 是的,这是可能的。dijit.Dialog可以有任何内容,也可以有其他dijit小部件。当前1.6.1版本的一些dijit.Dialog示例: 您需要一个名为“alertIcon”的CSS样式,类似于: <div dojoType="dijit.Dialog" id="errorDialog" title="An error occured" style="display: none"> &
是的,这是可能的。dijit.Dialog可以有任何内容,也可以有其他dijit小部件。当前1.6.1版本的一些dijit.Dialog示例:
您需要一个名为“alertIcon”的CSS样式,类似于:
<div dojoType="dijit.Dialog" id="errorDialog" title="An error occured" style="display: none">
<p id="errorMessage">An unexpected error occurred</p>
<button dojoType="dijit.form.Button" type="submit" onClick="hideErrorDialog();">
OK
</button>
下面是一些经过修改的HTML:
.alertIcon {
width:32px;
height:32px;
background-repeat:no-repeat;
background: url("path/to/alert/icon/alertIcon.png");
}
发生意外错误
好啊
<div dojoType="dijit.Dialog" id="errorDialog" title="An error occured" style="display: none">
<div>
<span class="dijitInline alertIcon"></span>
<span id="errorMessage" class="dijitInline">An unexpected error occurred</span>
</div>
<button dojoType="dijit.form.Button" type="submit" onClick="hideErrorDialog();">
OK
</button>