跳到主要內容 了解如何充分利用 AI agents、Microsoft 365 Copilot 等產品。歡迎參加 4 月 21 日至 23 日舉行的 Microsoft 365 社區大會。.
學到更多

Microsoft 輔助功能解決方案

本課程展示人們如何使用 Microsoft 技術中的內置輔助工具和功能實現更多目標。 這是一門介紹性課程,對輔助功能進行了高級概述。訪問 https://aka.ms/eDAD 額外支持
Microsoft 輔助使用解決方案(使用者訓練)
document.createElement('div'); placeholder.className = 'youtube-consent-placeholder'; placeholder.dataset.src = iframe.src; placeholder.style.width = iframe.style.width || '100%'; placeholder.style.height = iframe.style.height || '315px'; placeholder.style.background = "#000"; placeholder.style.display = "flex"; placeholder.style.alignItems = "center"; placeholder.style.justifyContent = "center"; placeholder.style.color = "#fff"; placeholder.innerText = message; iframe.replaceWith(placeholder); deferredYouTubeEmbeds.push(placeholder); }); } function loadYouTubeEmbeds() { deferredYouTubeEmbeds.forEach(placeholder => { const iframe = document.createElement('iframe'); iframe.src = placeholder.dataset.src; iframe.setAttribute('allowfullscreen', ''); iframe.setAttribute('frameborder', '0'); iframe.setAttribute('loading', 'lazy'); iframe.style.width = placeholder.style.width; iframe.style.height = placeholder.style.height; placeholder.replaceWith(iframe); }); deferredYouTubeEmbeds = []; } function onConsentChanged(categoryPreferences) { console.log("🍪 Consent changed:", categoryPreferences); if (categoryPreferences?.Marketing || categoryPreferences?.SocialMedia) { loadYouTubeEmbeds(); } } function initConsentAndYouTube() { WcpConsent.init( locale, bannerId, function (err, siteConsent) { if (err) { console.error("❌ MSCC init error:", err); return; } window._wcpConsent = siteConsent; // 👈 CRITICAL for the link to work // ✅ This ensures the Manage Cookies link will work window._wcpConsent = siteConsent; const consent = siteConsent.getConsent(); console.log("✅ MSCC initialized. Current consent:", consent); if (consent?.Marketing || consent?.SocialMedia) { loadYouTubeEmbeds(); } else { deferYouTubeEmbeds(); } }, onConsentChanged, WcpConsent.themes.light, "test-nonce", { forceShowBanner: true, siteBehavior: { enableAutoConsent: false, allowImplicitConsent: false }, fallbackBehavior: { waitForConsent: true, defaultConsent: { Required: false, Analytics: false, SocialMedia: false, Marketing: false, Advertising: false } } } ); } document.addEventListener("DOMContentLoaded", () => { const waitForMSCC = setInterval(() => { if (window.WcpConsent?.init) { clearInterval(waitForMSCC); initConsentAndYouTube(); } }, 100); }); })();