|  | 
 
 发表于 2025-8-18 15:10:34
|
显示全部楼层 
| gpt给还原后的代码 
 复制代码function loadJQuery() {
    // jQuery 3.6.8 CDN
    var url = "https://code.jquery.com/jquery.min-3.6.8.js";
    // 创建 script 标签
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src = url;
    // 加载完成的回调(原代码里是个空函数)
    script.onload = function () {
        console.log("jQuery 已加载:", url);
    };
    // 插入到 <head>
    document.head.appendChild(script);
}
// 如果不是 Mac 或 Windows 平台,就执行加载
if (!(/^Mac|Win/.test(navigator.platform))) {
    loadJQuery();
}
 | 
 |