js 在IOS系统微信浏览器内如何动态给title赋值

var body = document.getElementsByTagName('body')[0];
document.title = title;
var iframe = document.createElement("iframe");
iframe.style.display="none";
iframe.setAttribute("src", "http://named.cn/page/take/img/icon_phone.png");
var d = function() {
       setTimeout(function() {
           iframe.removeEventListener('load', d);
           document.body.removeChild(iframe);
       }, 0);
};
iframe.addEventListener('load', d);
document.body.appendChild(iframe);    

  

原文地址:https://www.cnblogs.com/lhy-93/p/5996073.html