这里是格如下:网格
if (responseJSON) {
showObjects(['anTable']);
showObjects(['dist']);
$('gridtab').innerHTML = '';
var wordStructure = [{
field: 'alpha',
name: 'Alpa Dictionary',
width: '200px'
}, {
field: 'numbers',
name: 'Number Format',
width: '200px'
}, {
field: 'words',
name: 'Normal words',
width: '200px'
}];
var wordStore = [];
}
下面是HTML表,如下所示,其是将被显示为弹出与上面的网格:
<table cellpadding='15' cellspacing='15' id="dist" style="display: none; width:auto">
<tr>
<td>
<div id="gridtab" style="width: 400%; font-size: 11pt; font-family: arial; border: 1px solid #fff; padding: 5px;"></div>
</td>
</tr>
<tr>
<td>
<center>
<button dojoType="dijit.form.Button" preventCache='true' useCache='false' cacheContent='false' onclick="getSelectedNormalWords();">Ok</button>
<button dojoType="dijit.form.Button" preventCache='true' useCache='false' cacheContent='false'>Cancel</button>
</center>
</td>
</tr>
</table>
showOjects(['dist'])
只是显示带有表格的网格,但我想将其显示为弹出式窗口。
function showObjects(objArray) {
for (var i = 0; i < objArray.length; i++) {
$(objArray[i]).style.display = 'block';
}
}
这是不相关的答案,但弹出窗口越来越过时。许多浏览器阻止弹出窗口。他们也有很多缺点,这就是为什么越来越多的人将弹出窗口切换到模态。 –
丹尼尔张非常感谢你的回应。但我需要根据我的项目显示它作为弹出窗口。 – Anusha
当你说“弹出”时,你的意思是一个完全独立的浏览器窗口,或只是弹出现有内容的东西?例如,像Dijit对话框那样工作? – jason0x43