弱弱的問一下,這里的檢測語句在哪里?是在http://www.xianlaiwan.cn/data/check_f.php里面嗎?但是我進去看,里面好像沒有
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
? ? <head>
? ? ? ? <title>使用post()方法以POST方式從服務器發送和獲取數據</title>
? ? ? ? <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
? ? ? ? <link href="style.css" rel="stylesheet" type="text/css" />
? ? </head>
? ??
? ? <body>
? ? ? ? <div id="divtest">
? ? ? ? ? ? <div class="title">
? ? ? ? ? ? ? ? <span class="fl">檢測數字是否大于0</span>?
? ? ? ? ? ? ? ? <span class="fr"><input id="btnCheck" type="button" value="檢測" /></span>
? ? ? ? ? ? </div>
? ? ? ? ? ? <ul>
? ? ? ? ? ? ? ?<li>請求輸入一個數字 <input id="txtNumber" type="text" size="12" /></li>
? ? ? ? ? ? </ul>
? ? ? ? </div>
? ? ? ??
? ? ? ? <script type="text/javascript">
? ? ? ? ? ? $(function () {
? ? ? ? ? ? ? ? $("#btnCheck").bind("click", function () {
? ? ? ? ? ? ? ? ? ? $.post("http://www.xianlaiwan.cn/data/check_f.php",{
? ? ? ? ? ? ? ? ? ?num:$("#txtNumber").val()
? ? ? ? ? ? ? ? ? ? },
? ? ? ? ? ? ? ? ? ? function (data) {
? ? ? ? ? ? ? ? ? ? ? ? $("ul").append("<li>你輸入的<b> ?"
? ? ? ? ? ? ? ? ? ? ? ? + $("#txtNumber").val() + " </b>是<b> "
? ? ? ? ? ? ? ? ? ? ? ? + data + " </b></li>");
? ? ? ? ? ? ? ? ? ? });
? ? ? ? ? ? ? ? })
? ? ? ? ? ? });
? ? ? ? </script>
? ? </body>
</html>
2015-12-18
后臺代碼當然不會讓你看到,為了安全性
你只要知道它做了什么事就行