當在universal link的網(wǎng)頁中,會生成meta name="apple-itunes-app"的標簽监透,去電這個標簽就可以了
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
if(document.head.querySelector("[name~=apple-itunes-app][content]")){//如果元素存在
var metaApp=document.head.querySelector("[name~=apple-itunes-app][content]");
console.log(metaApp)
metaApp.content="";
metaApp.name=""
document.head.appendChild(metaApp)
}