脚本如下:
<script src="js/jquery1.3.2.JS" language="javascript" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
function getComments(pageIndex) {
$.get("GetComments.ashx?page="+pageIndex+"",function(data){alert("data load"+data);});
}
</script>
<a href="/ViewItem.aspx?page=1" title="上一页" onclick="return getComments(1)">上一页</a>
<a href="/ViewItem.aspx?page=3" title="上一页" onclick="return getComments(3)">下一页</a>
<input type="button" name="button1" style="width: 61px" onclick="return getComments(3)"/>
点击<a 连接或 button按钮均没反应不执行函数getComments
return false