我正在尝试将 base64 数据发布到服务器,但我收到一个错误“Microsoft JScript 运行时错误:无法获取属性 'addEventListener' 的值:对象为空或未定义”下面我附上了错误屏幕截图任何帮助,谢谢。
var imagefile = canvas.toDataURL("image/png");
imagefile = imagefile.replace("data:image/png;base64,", "");
var oXHR = new XMLHttpRequest();
oXHR.upload.addEventListener('loadstart', uploadFinish, false);
oXHR.upload.addEventListener('progress', uploadProgress, false);
oXHR.upload.addEventListener('error', uploaderror, false);
oXHR.open('POST',"http://demo.donelook.com/eyewearweb/levellens.aspx",true);
oXHR.send(imagefile);