<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title> 我是之前的,1秒后被替换(适用于手机和pc) </title> <link rel="shortcut icon" href="snipaste_20170824_145806.png" type="image/x-icon" /> <!-- 修改小图标 --> </head> <body> <script type="text/javascript"> document.setTitle = function(t) { document.title = t; var i = document.createElement('iframe'); i.src = '//m.baidu.com/favicon.ico'; i.style.display = 'none'; i.onload = function() { setTimeout(function(){ i.remove(); }, 9) } document.body.appendChild(i); } setTimeout(function(){ document.setTitle('我是被替换后内容') document.title="可以直接用这个"; }, 1000) </script> </body> </html>