20260304临时补救article_list

This commit is contained in:
2026-03-24 09:51:18 +08:00
parent 8da302f382
commit 9dd44cc165
34 changed files with 5827 additions and 2066 deletions

View File

@@ -216,7 +216,23 @@ Date.prototype.format = function (format) {
// 头部
$('#top_bar').load('header.html')
$('#index_top').load('header_in.html')
$('#index_top').load('header_in.html', function() {
// 1. 找到所有带有跳转逻辑的 a 标签
var $logo = $(this).find('.home_logo');
// 2. 获取原有的 onclick 字符串
var oldClick = $logo.attr('onclick');
if (oldClick && oldClick.indexOf('window.location') !== -1) {
// 3. 直接将字符串里的 window 替换为 top
var newClick = oldClick.replace('window.location', 'top.location');
// 4. 重新赋值回去
$logo.attr('onclick', newClick);
console.log("✅ 已将触发方式修改为 top:", newClick);
}
});
// 高度一致