📅  最后修改于: 2022-03-11 15:02:55.688000             🧑  作者: Mango
const link = document.createElement('a');
link.id = 'someLink'; //give it an ID!
link.href = 'https://example.com'; // Your URL
//Add the link somewhere, an appendChild statement will do.
//Then run this
document.getElementById('someLink').click();