第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

通過 Jquery 加載導(dǎo)航欄時(shí)設(shè)置活動(dòng)類

通過 Jquery 加載導(dǎo)航欄時(shí)設(shè)置活動(dòng)類

幕布斯7119047 2021-08-20 10:29:11
在將導(dǎo)航菜單作為單獨(dú)的 html 文件加載時(shí),我試圖使用 jquery 來初始化它的活動(dòng)類。我不熟悉 PHP,而且我對(duì)網(wǎng)站生成還很陌生,所以我對(duì) JS 和常用語言(HTML、CSS 和 JS)之間的集成不太熟悉。問題是由 JSZip 創(chuàng)建的 .zip 存檔條目將具有與之關(guān)聯(lián)的文件修改時(shí)間戳。這會(huì)導(dǎo)致不同時(shí)間生成的文件之間存在微小差異(通常為幾個(gè)字節(jié))。因此,我們需要手動(dòng)指定文件時(shí)間戳,并確保我們僅在 .zip 存檔中創(chuàng)建虛擬文件夾。這種方法應(yīng)該對(duì)你有用(每次都給出相同的 MD5 哈希值):import JSZip = require('jszip');import crypto = require('crypto');// You must fix the date (set to the same value) so that the zip archive timestamps will be equal.// Also we must create virtual folders or they will be assigned timestamps too, resulting in a different hash.const options = { date: new Date('2019-07-24 06:00:00Z'), createFolders: false};zip.file("hello.txt", "Hello World\n", options);zip.file("nested/hello.txt", "Hello World\n", options);zip.generateAsync({    type: 'nodebuffer',    mimeType: 'application/epub+zip',    compression: 'DEFLATE',    compressionOptions: {        level: 9    },})    .then(buf => {        const md5 = crypto.createHash('md5');        let result = md5.update(buf).digest('hex');        console.dir(result);    });我希望導(dǎo)航菜單中的當(dāng)前項(xiàng)目以藍(lán)色突出顯示。當(dāng)點(diǎn)擊但未選擇(即頁面實(shí)際上并未加載)時(shí),這將成功設(shè)置為活動(dòng)類(背景為藍(lán)色)。
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 165 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)