如何在extjs中显示警报?

pra*_*een 4 extjs

在浏览器中执行以下代码时,它不会显示警报,只显示空白页面.以下代码中的任何错误都可以帮助我.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text.html; charset=utf-8">

<title> First Program </title>

<link rel="stylesheet" type="text/css" href ="http://localhost:8080/ext/ext-4.2.1.883/resources/css/ext-all.css"/>
<script type = "text/javascript" src = "http://localhost:8080/ext/ext-4.2.1.883/ext-all-dev.js"/>

<script type="text/javascript">
    Ext.onReady(function(){
        //  alert("We are ready to go!");
        Ext.Msg.alert("Hello World");
    });
</script>
</head>
<body>

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

Lor*_*yer 8

您没有正确调用该方法.Ext.Msg.alert有两个参数,title并且message,你可以在看文档.