📅  最后修改于: 2022-03-11 15:03:32.793000             🧑  作者: Mango
const link = document.querySelector('a');
console.log(link.getAttribute('href'));
link.setAttribute('href', 'https://www.yahoo.com');
link.innerText='Yahoo';