// 输入框回车键跳转
					document.onkeydown = function(e){
					    if(e.keyCode == 13){
					    	inputa();
					    }
					}
					// 输入框点击外侧跳转
                    document.addEventListener("click", function(e) {
						if(e.target.id !="inputer"){
							inputa();
						}
					})
					// 输入框确定按钮跳转
					function inputa(){
						if (document.getElementById("inputer").value > totalPage) {
							document.getElementById("inputer").value = totalPage;
                             //totalpage是最大页码
						}
						var datas = {
								"curstarttime": curstarttime,
								"curendtime": curendtime,
								"deptid": deptid,
								"areaid": areaid,
								"version": version,
								"yujinglx": yujinglx,
								"pageNum": document.getElementById("inputer").value, //页码
								"shuju_fl": totalname,
							};
							$.ajax({
								url: "http://",
								type: 'POST',
								contentType: "application/json; charset=utf-8",
								data: JSON.stringify(datas),
								success: function(response) {
									loadorderlist(response.data);
								}
							});
						}

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐