在节点上运行HTML时无法获取错误

时间:2019-10-20 18:54:32

标签: javascript html

我的首页html中有一个链接,但是单击它时会收到错误消息:

  

无法获取/Forgot_Password_V1.html

Directory:
-Login_Page_V2.html
-Forgot_Password_V1.html
-Login_Page_V1.js

app.use('/public', express.static(path.join(__dirname, 'public')));

//routes
app.get('/', function(request, response) {
response.sendFile(path.join(__dirname + '/Login_Page_V2.html'));
});

app.get('/Forgot_Password_V1', function(request, response) {
response.sendFile(__dirname + './Forgot_Password_V1.html');
});
<a href="Forgot_Password_V1.html" style="text-decoration: none">Forgot your password?</a>

我也尝试过此HTML,但没有用:

<a href="http://<server_url>/Forgot_Password_V1.html" style="text-decoration: none">Forgot your password?</a>

1 个答案:

答案 0 :(得分:-1)

为什么需要渲染它?您是在注入任何内容还是在进行动态更新。如果没有,您可以按照以下方式直接发送。

j = ++j;