<div class="codetitle"> <span><a style="CURSOR: pointer" data="98765" class="copybut" id="copybut98765" onclick="doCopy('code98765')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code98765"> <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> </div> <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="90479" class="copybut" id="copybut90479" onclick="doCopy('code90479')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code90479"> <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> </div> <br>