对php的Jquery ajax调用不起作用


Jquery ajax call to php not working

我的代码有一些问题。我想知道是否有人能看一看,给我一些提示,告诉我哪里出了问题。

index.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>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Load</title>
</head>
<body>
<div class="s1">Load</div>
<div class="physique"></div>
<script>
$(document).ready(function() {
$(".s1").click( function() {                             
    $.ajax({
       type: "POST",
       url: "test.php",
       data: "html",
       data: "start=physique&pass="+$("#pass").val(),
       success: function(msg){
      $(".physique").html(msg).delay(300).fadeIn(300);
       }
    });
    return false;
});
   $("tr").click( function() {                           
    alert("hello");
});
});
</script>
</body>
</html>`

以及生成响应的php文件,(我删掉了大部分,只是留下了响应,因为我知道我的错误不是来自php。test.php

<table id="phys" style="width: 750px">
<tbody>
<tr class="titlte"><td colspan="2">Fichier</td><td>Taille</td><td>Ajouter</td></tr>
<tr class="links" links="<?=$fileurl;?>">
<td style="width: 30px"><img src="dlf/<?    =$icon;?>" alt="<?=$files[$i];?>" /></td>
<td style="width: 550px"><a vref="<?=$fileurl;?>" class="ajaxtrigger">
<strong class="links"><?=$filename;?></strong></a></td>
<td style="width: 70px"><em><?=round(filesize($leadon.$files[$i])/1024);?>KB</em></td>
<td style="width: 100px"><?=date ("M d Y", filemtime($leadon.$files[$i]));?></td></tr>
<tbody>
</table>`

我希望你能帮忙。

可能是dataType: html$.ajax(...)定义中的拼写错误

$.ajax({
   type: "POST",
   url: "test.php",
   dataType: "html",
   data: "start=physique&pass="+$("#pass").val(),
   success: function(msg){
      $(".physique").html(msg).delay(300).fadeIn(300);
   }
});