我在 github 中上传我的项目,但下一页
movies.html
未显示。如果您在 movies.html
上的我的搜索栏中搜索电影,它应该会转到下一页 index.html
。请参阅下面的链接。
在我的
script.js
中,我使用了window.location.href
,但是当我搜索电影时,它说404 There isn't a GitHub Pages site here.
searchBox.addEventListener("submit", (event) => {
const searchBarValue = document.getElementById("searchbar").value;
event.preventDefault();
localStorage.setItem('key', searchBarValue);
// console.log(window.location)
window.location.href = `${window.location.origin}/movies/movies.html`;
});