[英]When I tried to run a node js file .I am getting ReferenceError: XMLHttpRequest is not defined
From google search I came to know that it is because XMLHttp not installed(many sites are saying the same reason).I installed that using install xmlhttprequest.从谷歌搜索我知道这是因为没有安装 XMLHttp(许多网站都说同样的原因)。我使用 install xmlhttprequest 安装了它。 I guess it is installed properly.Again the same error is showing.How can I solve that problem.Since I am on my learning period,I don't have much idea about debugging.I have added the code a little and the error pattern obtained while running in terminal.Can somebody give what is happening and what should i do to overcome this error
我猜它安装正确。再次显示相同的错误。我该如何解决这个问题。由于我处于学习期,我对调试没有太多想法。我已经添加了一点代码和错误模式在终端中运行时获得。有人可以给出正在发生的事情,我应该怎么做才能克服这个错误
const setEditModal = (isbn) => {
const xhttp = new XMLHttpRequest();
xhttp.open("GET", `http://localhost:3000/book/${isbn}`, false);
xhttp.send();
Error:错误:
ReferenceError: XMLHttpRequest is not defined
at loadBooks (C:\Users\Hp\book-list.js:38:19)
at Object.<anonymous> (C:\Users\Hp\book-list.js:73:1)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.