Home > php教程 > php手册 > body text

带有输入跳转的分页

WBOY
Release: 2016-06-07 11:36:04
Original
1045 people have browsed it

第一次发表文章大家多多指教
先发一下效果图吧带有输入跳转的分页


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', ' 共有%TOTAL_ROW%条记录

当前第%NOW_PAGE%页 共有%TOTAL_PAGE%页
%UP_PAGE% %FIRST% %LINK_PAGE% %END% %DOWN_PAGE%
');

jq部分
$(function(){
$('#z').blur(function(){
var url=$('.tiaozhuan').attr("href");
var strs=url.substr(0,25);


var value=this.value;
var all=$('.all').attr("title");
var i=parseFloat(all);//将字符转化成数字

if(value0){
value=Math.ceil(value);
}else{
value='';
}

var newurl=strs+value;
$('.tiaozhuan').attr("href",newurl);
});


css部分
.right{float: left;color: #000000;padding: 10px 0 0 50px;}
.za{float: right;padding: 10px 10px 0 0;}

.zi{float: left;padding: 0 5px 0 0;}
.all{float: left;padding: 0 0 0 5px;}
.info{float: right;}
.info input{border:solid #ccc 1px;}
.tiaozhuan{padding: 0 0 0 5px;}
.page{float: left;padding: 0 20px 0 20px;}
.page a{float:left;display:block;margin: 0 1px 0 1px;color: #ffffff}
.current{float:left;display:block;margin: 0 1px 0 1px;background: #aad83e;width: 20px;height: 20px;text-align: center}
.num{background: #2c2c2c;width: 20px;height: 20px;text-align: center}
.prev{width: 60px;height: 20px;background: #8a8787;text-align: center}
.next{width: 60px;height: 20px;background: #8a8787;text-align: center}
.first{width: 40px;height: 20px;background: #8a8787;text-align: center}
.end{width: 40px;height: 20px;background: #8a8787;text-align: center}
css部分建议自己调整一下

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template