gpt4 book ai didi

html - 如何更新所有 HTML 页面中的表格内容?

转载 作者:行者123 更新时间:2023-11-28 09:36:33 25 4
gpt4 key购买 nike

我是一名新开发者。

我正在制作一个网站,它将包含很多页面,很可能有 100 个或更多。在所有这些页面中,我都插入了 HTML 表格。

现在如何一次更新所有表格内容?不编辑数百页?

我已将链接插入到表格中,但我需要更新所有页面中的链接。这是我在所有页面中插入的表格。

<table>
<tr><th>Recomended</th></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
<tr><td><a href="http://example.com" target="_blank">example</a></td></tr>
</table>

如何更新 example.com?

最佳答案

创建一个table.html文件把你的表放在这个 html 文件中使用 jquery.js使用 jquery 加载函数

$('#div1').load('table.html', function() {

//callback
});

一次更新。

关于html - 如何更新所有 HTML 页面中的表格内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25504800/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com