我試圖找出battlelog如何管理從內部邊緣瀏覽器中啓動本地應用程序,發現如下:如何將自定義屬性添加到標準HTML元素?
<button class="btn btn-primary" data-intro-step="4" data-bind-action="matchmake-mp-role" data-track="playnow.matchmake.cqclassic.join" data-bind-intro="next" data-expansion="0" data-game="2048" data-platform="1" data-role="1" data-experience="1">
Play now
</button>
請幫我瞭解這些屬性,如數據綁定行動等已添加按鈕元素以及它們如何被處理?
看到這個https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes – prasanth
如果你想使用jquery,請看這個https://api.jquery.com/jquery.data/ –
自定義屬性只是將*有效*數據存儲在沒有固有含義或視覺屬性的DOM元素中的一種方式。如何添加它們以及它們如何被使用(或處理)不能僅由您顯示的HTML來確定。 – illiteratecoder