<u>复制代码</u> 代码如下:<br><br> <br> <title>HelloWorld</title> <br> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <br> <link rel="stylesheet" type="text/css" href="../../ext-4.0.7-gpl/resources/css/ext-all.css"> <br> <script type="text/javascript" src="../../ext-4.0.7-gpl/bootstrap.js"></script><br> <script type="text/javascript" src="../../ext-4.0.7-gpl/locale/ext-lang-zh_CN.js"></script><br> <script type="text/javascript"><BR> Ext.onReady(function(){<BR> var requestConfig = {<BR> url:'loginServer.php', //请求的服务器地址<BR> params:{userName:'lowkey', password:'zq19890319'}, //请求参数<BR> method : "post",<BR> callback:function(options, success, response) {<BR> var msg=["请求是否成功:", success, "\n",<BR> "服务器返回值:", response.responseText];<BR> Ext.Msg.alert("提示", response.responseText);<BR> }<BR> }<BR> Ext.Ajax.request(requestConfig);<BR> });<br><br> </script><br> <br><br> <br> <br><br><br><u>复制代码</u> 代码如下:<br><?php <BR> $userName = $_POST["userName"];<br> $password = $_POST["password"];<br> $msg = "";<br> if($userName=="lowkey" && $password=="zq19890319") {<br> $msg = "登陆成功";<br> } else {<br> $msg = "登陆失败";<br> }<br> echo($msg);<br>?><br><br>