我如何获得node.js并表达将某些内容发送到特定的HTML元素,例如Textarea,在水疗中有用?

发布于 2025-01-24 03:16:34 字数 80 浏览 2 评论 0 原文

我不想使用React或Angular,只需将一些数据发送回某个地方即可。我尝试了res.render(),但是无论我放在括号内的任何东西都失败了。

I don't want to have to use React or Angular, just send back some data to put somewhere. I tried res.render() but whatever I put inside the parentheses failed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦过后 2025-01-31 03:16:34

要使用 res.render 您必须定义视图引擎
参考 -

,如果您想发送HTML文件使用 res.sendfile

To use res.render you have to define the view engine.
Refer - https://www.geeksforgeeks.org/express-js-res-render-function/

And if you want to send an HTML file use res.sendFile

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文