时时商务社区
标题:
php分页不用get用post代码实例
[打印本页]
作者:
xgnic
时间:
2018-2-18 04:48
a href='PHP_SELF'];?>?page=1'>1a>
a href='PHP_SELF'];?>?page=2'>2a>
....
form id="myform" method="post" name="myform" action="">
input type="hidden" name="page" id="page" value="" />
form>
a href="#" onclick="mylink(1)">1a>
a href="#" onclick="mylink(2)">2a>
....
script language="java script">
function mylink(page)
{
document.getElementById('page').value = page;
document.myform.submit();
}
echo '
get page=' . $_GET['page'];
echo '
post page=' . $_POST['page'];
?>
欢迎光临 时时商务社区 (http://bbs.4435.cn/)
Powered by Discuz! X3.2