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

时间:2016-10-25 11:48:26   收藏:0   阅读:300
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);    

  

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!