js如何实现点击图中login.html文件中的input标签,然后跳转到图中的index.html这个页面?求解答。

js如何实现点击图中login.html文件中的input标签,然后跳转到图中的index.html这个页面?求解答。

使用js进行跳转:
// js
let submit = document.getElementById("submit")
submit.onclick = function(){
window.loaction.href = "../index.html";
// 或者
window.open("../index.html");
}
//jq
$("#submit").click(function() {
window.loaction.href = "../index.html";
// 或者
window.open("../index.html");
})