惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
L
LINUX DO - 热门话题
W
WeLiveSecurity
S
Security @ Cisco Blogs
Hacker News: Ask HN
Hacker News: Ask HN
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Schneier on Security
Schneier on Security
TaoSecurity Blog
TaoSecurity Blog
Webroot Blog
Webroot Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Forbes - Security
Forbes - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Google DeepMind News
Google DeepMind News
I
Intezer
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Privacy & Cybersecurity Law Blog
PCI Perspectives
PCI Perspectives
V2EX - 技术
V2EX - 技术
N
News and Events Feed by Topic
T
Threat Research - Cisco Blogs
T
Tor Project blog
V
Vulnerabilities – Threatpost
N
News and Events Feed by Topic
C
Cyber Attacks, Cyber Crime and Cyber Security
Latest news
Latest news
L
Lohrmann on Cybersecurity
N
News | PayPal Newsroom
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
大猫的无限游戏
大猫的无限游戏
Attack and Defense Labs
Attack and Defense Labs
Security Latest
Security Latest
酷 壳 – CoolShell
酷 壳 – CoolShell
Y
Y Combinator Blog
博客园_首页
博客园 - 三生石上(FineUI控件)
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
J
Java Code Geeks
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
量子位
V
Visual Studio Blog
D
DataBreaches.Net
小众软件
小众软件
雷峰网
雷峰网
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - Hawk_Yuan

Aspose.Words aspose.cell C#通过SQL读写文件 Aspose.Cells asp.net mvc 4 json大数据异常 提示JSON字符长度超出限制的异常[转载] 日期转换成字符串 LinkServer GridView小记 SoapHeader Credential 等等等 决心要创业成功的10个必备信念 成功人的共性 会计科目 [转]BOM分层六项原则 [转]ERP核心理念讲座系列(四) [转]ERP核心理念讲座系列(三) [转]ERP核心理念讲座系列(二) [转]ERP核心理念讲座系列(一)
JQGrid自動翻頁
Hawk_Yuan · 2024-01-15 · via 博客园 - Hawk_Yuan

<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- 引入 jQuery 和 jqGrid 相关的库和样式 --><script src="https://code.jquery.com/jquery-3.6.0.min.js"></script><link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" /><script src="https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.15.5/jquery.jqgrid.min.js"></script><link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.15.5/css/ui.jqgrid.min.css" /><title>jqGrid Example with Data</title></head><body><table id="grid"></table><script>
// 定义您的数据数组
var myData = [
{ VendorName: "A", UnRate: 1, UnCount: 2 },
{ VendorName: "B", UnRate: 11, UnCount: 22 },
{ VendorName: "C", UnRate: 33, UnCount: 44 },
];
// 初始化 jqGrid
$("#grid").jqGrid({
datatype: "local",
data: myData,
colModel: [
{ name: "VendorName", label: "Vendor Name", width: 100 },
{ name: "UnRate", label: "UnRate", width: 100 },
{ name: "UnCount", label: "UnCount", width: 100 },
],
rowNum: 1,
rowList: [1, 2, 3],
viewrecords: true,
caption: "Example with Data",
pager: true
});

// 设置自动翻页
var autoPagingInterval = 3000; // 翻页间隔时间(以毫秒为单位),设置为 3 秒
setInterval(function() {
var grid = $("#grid");
var currentPage = grid.jqGrid('getGridParam', 'page'); // 获取当前页号
var totalPages = grid.jqGrid('getGridParam', 'lastpage'); // 获取总页数
var nextPage = currentPage < totalPages ? currentPage + 1 : 1; // 计算下一页号
grid.jqGrid('setGridParam', { page: nextPage }).trigger("reloadGrid");
}, autoPagingInterval);
</script></body></html>