The AMP One Tap component is deprecated. This means that new web apps shouldn't use this component, and developers of the existing apps should follow the
migration guide to make any necessary changes to avoid negative impacts for user sign-in to their websites.
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
提供意見
AMP 元件 API 參考資料
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本參考頁面說明 <amp-onetap-google> AMP 元件的 API。
如要瞭解如何使用中繼 iframe,請參閱「使用 iframe 整合 One Tap 」指南。
載入 <amp-onetap-google> AMP 元件
將下列程式碼片段放入要使用 <amp-onetap-google> AMP 元件的任何 AMP 網頁:
<script custom - element = "amp-onetap-google" src = "https://cdn.ampproject.org/v0/amp-onetap-google-0.1.js" async ></script >
<amp-onetap-google> AMP 元件
下表列出資料屬性及其相關說明:
屬性
data-src
One Tap 中繼 iframe 的 URI
layout
AMP 元件的版面配置。僅允許使用「nodisplay」。
data-src
這個屬性是 One Tap 中介 iframe 的 URI。詳情請參閱下表:
類型
必填
範例
字串
是
data-src="https://example.com/onetap_iframe.html"
版面配置
這個屬性是 AMP 元件的版面配置,也是 AMP 元件的必要屬性。對於 <amp-onetap-google> 元件,只允許使用「nodisplay」。詳情請參閱下表:
類型
必填
範例
字串
是
layout="nondisplay"
提供意見
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權 ,程式碼範例則為阿帕契 2.0 授權 。詳情請參閱《Google Developers 網站政策 》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-08 (世界標準時間)。
想進一步說明嗎?
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-11-08 (世界標準時間)。"],[],[]]