javascript - 为什么从一页移动到另一页不起作用?
问题描述
如果我输入正确的用户名和密码,我想从一个页面移动到另一个页面。为此我使用window.location.href
但是当我尝试使用它时,它说即使两个页面都在同一个文件夹中,另一个页面也被删除或移动了
if(UN == "a" && PA == "123"){
window.location.href="<file:///C:/Users/user/Desktop/ProudMom/secondPage.html>";
解决方案
尝试这个:
if(UN == "a" && PA == "123"){
window.location.href="secondPage.html";
}
推荐阅读
- amazon-web-services - Cloud9 是否提供 t2.micro 实例?
- android - 将 ML 模型添加到 Android Studio
- forms - 如何为 Web 界面使用表单和 url 参数的嵌入式设备设置 nginx 反向代理?
- javascript - 使用 for .. of 循环向所有按钮添加相同的事件侦听器
- graphql - AWS AppSync 错误:模板转换产生空响应
- laravel - 仅限管理员访问
- javascript - 正则表达式匹配日期中的数字,但不应该
- java - 如何生成 AWS 格式的跟踪 ID
- .net - 追加到文件开头
- graphql - 需要身份证吗!对于 GraphQL 架构中的所有类型?