我有一个 aspx 页面,其中有一个用户控件。 ext:Window 被放置在用户控件中
<ext:Window Hidden="true" AutoScroll="false" Closable="true"
HideParent="true" Modal="true" Resizable="false" Header="true" runat="server" ID="tswindow"
我想使用 JavaScript 调用来显示此窗口。
var window = Ext.getCmp('<%= tswindow.ClientID %>');
window.show();
我收到以下错误
Uncaught TypeError: Object [object DOMWindow] has no method 'show'
最佳答案
试试这个可能有效。
在窗口配置中定义Id="my_window",然后获取窗口对象 Ext.getCmp('my_window').show();
关于javascript - 如何获取ext窗口的id,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8272217/