PHP部分代码:
$module_name = '/' . MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME;//获取路径 $page->lastSuffix = false; // 最后一页是否显示总页数 $page->setConfig('prev', '<<'); $page->setConfig('next', '>>'); $page->setConfig('first', '首页'); $page->setConfig('last', '尾页'); $page->setConfig('theme', ' <div class="game_page">%UP_PAGE% %FIRST% %LINK_PAGE% %END% %DOWN_PAGE%<span class="loadline">到第</span><input type="text" id="z"><span class="loadline">页</span><a class="tiaozhuan" href="' . $module_name . '/p/">确定</a></div> '); $this->assign('page', $page->show());
jq代码:
<script> $('.tiaozhuan').click(function () { var tz=$('#z').val(); var pageurl=$('.tiaozhuan').attr("href"); $('.tiaozhuan').attr("href",pageurl+tz); }) </script>
前端代码:
<div class="rrom"> {$page} </div>
效果图:
文章评论(0)