javascript - Javascript 和 Electron Js | window.location.pathname 错误
问题描述
function onclick () {
window.location.pathname = "home/userıd/desktop/project folder/src/html/index.html" }
此代码有效!
但
function onclick () {
window.location.pathname = "/src/html/index.html" }
它不起作用,我现在在项目文件夹中
解决方案
推荐阅读
- javascript - 在 Angular 9 中创建多个复选框对我不起作用
- c++ - 连接到命名管道
- swift - 帮助快速布局(对你来说很简单,不是我哈哈)
- java - 手动将@Entity 转换为投影界面
- node.js - axios post socket 仅在 docker 中挂断
- testng - 并行运行 citrusframework 测试用例
- etl - 数据仓库层中的代理键有什么好处?
- powershell - 使用 Powershell 启用或禁用组策略
- css - CSS - 向左浮动使 Div 消失
- javascript - 使用存储的函数打印变量会产生 [Function],这是什么意思?