2

我是 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>

截屏

4

1 回答 1

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

于 2012-12-13T07:21:35.603 回答