只需要一个header.js 就ok了
然后在页面中引入此 js即可
$(document).attr("title", "实验柜报名");//修改title值
var cssURL = 'http://mat1.gtimg.com/www/icon/favicon2.ico'; //腾讯的图标
var head = document.getElementsByTagName('head')[0];
linkTag = document.createElement('link');
linkTag.href = cssURL;
linkTag.setAttribute('rel', 'shortcut icon');
linkTag.setAttribute('type', 'images/x-icon');
head.appendChild(linkTag);
});