我是ExtJs的新手。当我运行以下代码时,它会显示消息提示,但提示右上角的关闭按钮不可见,但是当我点击右上角时,该框将被关闭。
<html>
<head>
<title>Getting Started </title>
<link rel="stylesheet" type="text/css"
href="lib/extjs/resources/css/ext-all.css"/>
<script src="lib/extjs/adapter/ext/ext-base.js"></script>
<script src="lib/extjs/ext-all-debug.js"></script>
<script>
Ext.onReady(function(){
Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
if (btn == 'ok'){
Ext.Msg.alert('Status', 'You Okayed it: '+text);
}else{
Ext.Msg.show({
title: 'Hello',
msg: 'you cancelled it: Mr:'+text,
buttons: Ext.Msg.YESNOCANCEL,
animEl: 'elId'
});
}
});
});
</script>
</head>
<body>
<!--Nothing to Display -->
</body>
</html>
答案 0 :(得分:1)
您的错误无法重现。如果我拿走你的代码并运行它,就会显示关闭按钮。
Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
if (btn == 'ok'){
Ext.Msg.alert('Status', 'You Okayed it: '+text);
}else{
Ext.Msg.show({
title: 'Hello',
msg: 'you cancelled it: Mr:'+text,
buttons: Ext.Msg.YESNOCANCEL,
animEl: 'elId'
});
}
});
<强> JSFiddle 强>