【示例】 预览效果 源代码 温馨提示,单击请在单独窗口中测试。 在模拟器中预览 JS window.onload = function(){ //修改浏览器title document.getElementById("titleNewline").onclick = function(){ document.title = this.getAttribute("data-title");//修改为目标title } }; 下载源代码