1、显示html
var htmlTitle = "<div style='width:100%;text-align:center'>"; var fruits = ['apple', 'orange', 'strawberry', 'blueberry', 'grape']; for (var i = 0; i < fruits.length; i++) { htmlTitle += "<a href='#'>" + fruits[i] + "</a><br>" } htmlTitle += "</div>" win = new Ext.Window({ title: "查看", width: 400, height: 200, modal: true, closeAction: "hide", plain: true, maximizable: false, html: htmlTitle }); win.show(this);
2、显示iframe
var win = new Ext.Window({ id: "iframeWin", title: "打开百度", width: 400, height: 200, resizable: true, autoscroll: true, maximizable: true, layout: "fit", html: '<iframe style="overflow:auto;width:100%; height:100%;" src="http://www.baidu.com" frameborder="0"></iframe>' }).show();