»ùÓÚjQueryµÄAjax¼¼ÊõÖУ¬edit£¨id£©º¯ÊýÎÞ·¨»ñµÃphpÖеıäÁ¿Öµ£¬ÇóÖ¸µã
<?
@session_start();
$user1=isset($_SESSION["userper"])?$_SESSION["userper"]:NULL;
if(!$user1){echo"<script>window.location.href='../main/illegal.html';</script>";}
?>
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="../js.css/plus.css">
<title>¼òÀú²Ù×÷</title>
<script src="../js.css/jquery-1.11.2.min.js"></script>
<script>
$(document).ready(function(){
function edit(id){
alert(id);
// $.post("persusnavi4plus.php",{id:id,sid:Math.random()},
// function(data){
// $("#back").html(data);});
// }
}
});
</script>
</head>
<body>
<div class="psnavi4">
<?
$connect=mysql_connect('localhost','root','ellis') or die("ÎÞ·¨µÇ½Êý¾Ý¿â!");
mysql_select_db("ojrs", $connect);
mysql_query("set names 'utf8'");
echo"<h3>ͶµÝ¼òÀú¼Ç¼</h3>";
$mysql=mysql_query("select * from pte where appN='$user1' order by appD desc");
if(mysql_num_rows($mysql)==0){echo "ÄúûÓнøÐйýÈκμòÀúµÄͶËÍ£¡Ò²ÐíÄú¸Ã»ý¼«µã¡£";}
else{
echo"<table><tr><th>ʱ¼ä</th><th>¸Úλ</th><th>¹«Ë¾</th><th>²é¿´»Ø¸´<th>ɾ³ý¼Ç¼</th></tr>";
while($row=mysql_fetch_array($mysql)){
echo"<tr><td>".$row[appD]."</td><td>".$row[tolike]."</td><td>".$row[toReN]."</td><td><a href='javascript:void(0);' onClick='edit(".$row[appN].")'>²é¿´</a></td><td><a href='javascript:void(0);' onClick='edit(".$row[snumI].")'>ɾ³ý</a></td></tr>";}
/* echo"<tr><td>".$row[appD]."</td><td>".$row[tolike]."</td><td>".$row[toReN]."</td><td><a href='javascript:void(0);' onClick='"."edit(".$row[appN].")"."'>²é¿´</a></td><td><a href='javascript:void(0);' onClick='"."edit(".$row[snumI].")"."'>ɾ³ý</a></td></tr>";}*/
echo"</table>";
}
?>
<div id="back"></div>
</div>
</body>
</html>
·ÖÏíµ½£º
¡¡