分页跳转js

@Ta 2021-09-14发布,2021-09-14修改 1439点击
var gopage = function(){
	$('.pagination span:contains("...")').click(function(){
		var pid=$(this);
		var phtml=pid.html();
		var turl=location.search;
		if (location.search=="") turl+='?';
		var valuen='';
		var s=turl.split('?')[1].split('&');
		for(i=0;i<s.length;i++){
			value=s[i]
			if (value){
				values=value.split('=')
				if (values[0]!='page') valuen+='<input name="'+values[0]+'" value="'+decodeURI(values[1])+'" type="hidden">';
			}
		}
		valuen+='<input name="page" value="" type="text">';
		$(this).html('<form action="'+location.pathname+'" method="get">'+valuen+'</form>').unbind();
		$('input[name=page]').focus();
		$('input[name=page]').blur(function(){
			pid.html(phtml);
			gopage();
		});
	})
}
gopage();

以前自己写php用的,现在用thinkphp了,改了下还能用
360截图20210914233217812.jpg
360截图20210914233241192.jpg
回复列表(1|隐藏机器人聊天)
添加新回复
回复需要登录