本文介绍了未捕获的TypeError:DOM对象构造函数不能作为函数调用。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我正在尝试使用JavaScript从通用处理程序文件中获取方法。
我收到错误Uncaught TypeError:DOM对象构造函数不能作为函数调用。
这里是我的函数来自.js文件
Hi guys
I am trying to get a method from a generic Handler File using JavaScript.
I get the error "Uncaught TypeError: DOM object constructor cannot be called as a function."
here is my function from .js file
var httpReq = null;
httpReq = XMLHttpRequest();
httpReq.onreadystatechange = XMLHttpRequest;
httpReq.open("/_Property/PropertyGH.ashx?method=save");
httpReq.send(null);
推荐答案
引用:
var httpReq = new XMLHttpRequest();
var httpReq = new XMLHttpRequest();
Valery。
Valery.
这篇关于未捕获的TypeError:DOM对象构造函数不能作为函数调用。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!