Heim > Artikel > Backend-Entwicklung > 生手对jQuery不是很懂,求帮个忙
新手对jQuery不是很懂,求帮个忙
我写了一个的temper.html页面去调用http://hys2013.sinaapp.com/SQL.php页面的内容,我照着网上的例子来怎么不行啊(页面不弹窗)
temper.html:
<html><br /><head><br /> <br /><script type="text/javascript" src="/jquery/jquery.js"></script><br /><script type="text/javascript"><br />$.post("http://hys2013.sinaapp.com/SQL.php",function(data){ alert("Data Loaded: " + data); });<br /></script><br /></head><br /><body><br /><br /></body><br /></html><br />
<? <br /><br /> $mysql = new SaeMysql();<br /> $conn = mysql_connect(SAE_MYSQL_HOST_M.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS);<br /> //if($conn){ $action="连接成功"; echo "document.write('".$action."');n"; } <br /> $sql="SELECT * FROM `temp` WHERE id = ( SELECT MAX( CAST( id AS UNSIGNED ) ) FROM temp )";//获取最大ID的那一行 <br /> $row=$mysql->getLine($sql);<br /> foreach ($row as $key=>$value)<br /> { <br /> $insert_id=$value;<br /> break;//目前只需要id所以无需遍历所有值<br /> }<br />echo $insert_id;<br />?>