使用以下功能:
function showError(ptitle,perror){
Ext.Msg.show({
title: ptitle,
icon: Ext.MessageBox.ERROR,
msg: perror,
buttons: Ext.MessageBox.OK
});
}
我收到以下错误:
Uncaught TypeError: Cannot read property 'ERROR' of undefined
我看不到小麦这个代码有问题。任何帮助,将不胜感激。
答案 0 :(得分:0)
相同的代码在我的位置工作, 只需尝试使用Ext.Msg.ERROR而不是Ext.MessageBox.ERROR。
答案 1 :(得分:0)
这应该有效:
Ext.MessageBox.show({
title: ptitle,
icon: Ext.MessageBox.ERROR,
msg: perror,
buttons: Ext.MessageBox.OK
});