<script type="text/javascript">
$(document).ready(function() {
$("a").click(function() {
$("#results").load("jquery-routing.php", { pageNo: $(this).text(), sortBy: $("#sortBy").val()});
return false;
});
});
</script>
<div id="results"> </div>
<a href="jquery-routing.php?p=1">1</a>
<a href="jquery-routing.php?p=2">2</a>
该代码工作正常,只有问题,我运行后,我所有的一个href链接停止工作!链接变成jquery ajax调用..为什么?jQuery的问题,jQuery接管页面上的所有链接
如果你的目的是要执行这个load()方法,只要点击任何链接,那么里昂是正确的;否则,其他人都是正确的:)(可能) – harpo 2010-04-16 03:56:19