why????
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
? ? ? ? <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">檢測(cè)數(shù)字是否大于0</span>?
? ? ? ? ? ? ? ? <span class="fr"><input id="btnCheck" type="button" value="檢測(cè)" /></span>
? ? ? ? ? ? </div>
? ? ? ? ? ? <ul>
? ? ? ? ? ? ? ?<li>請(qǐng)求輸入一個(gè)數(shù)字 <input id="txtNumber" type="text" size="12" /></li>
? ? ? ? ? ? </ul>
? ? ? ? </div>
? ? ? ??
? ? ? ? <script type="text/javascript">
? ? ? ? ? ? $(function () {
? ? ? ? ? ? ? ? $("#btnCheck").bind("click", function () {
? ? ? ? ? ? ? ? ? ? $.post("http://idcbgp.cn/data/check_f.php",{
? ? ? ? ? ? ? ? ? ? ? num:$("#txtNumber").val()
? ? ? ? ? ? ? ? ? ? },
? ? ? ? ? ? ? ? ? ? function (data) {
? ? ? ? ? ? ? ? ? ? ? ? $("ul").append("<li>你輸入的<b> ?"
? ? ? ? ? ? ? ? ? ? ? ? + $("#txtNumber").val() + " </b>是<b> "
? ? ? ? ? ? ? ? ? ? ? ? + data + " </b></li>");
? ? ? ? ? ? ? ? ? ? });
? ? ? ? ? ? ? ? })
? ? ? ? ? ? });
? ? ? ? </script>
? ? </body>
</html>
2018-08-06
在網(wǎng)頁(yè)上的運(yùn)行這里的http://idcbgp.cn/data/check_f.php? ,把http加上s
2018-08-06
我復(fù)制到本地沒問題啊
2018-07-31
如果把代碼拷貝到本地,會(huì)因?yàn)闄?quán)限問題,不能訪問http://idcbgp.cn/data/check_f.php這個(gè)文件,建議你自己重寫php文件。