<a href='<?=$_SERVER['PHP_SELF'];?>?page=1'>1</a>
<a href='<?=$_SERVER['PHP_SELF'];?>?page=2'>2</a>
....
<form id="myform" method="post" name="myform" action="<?=$_SERVER['PHP_SELF'];?>">
<input type="hidden" name="page" id="page" value="" />
</form>
<a href="#" onclick="mylink(1)">1</a>
<a href="#" onclick="mylink(2)">2</a>
....
<script language="JavaScript">
function mylink(page)
{
document.getElementById('page').value = page;
document.myform.submit();
}
</script>
<?php
echo '<br />get page=' . $_GET['page'];
echo '<br />post page=' . $_POST['page'];
?>
新闻热点
疑难解答