EncodeURIComponent 抛出“对象不支持此属性或方法”错误(IE 8)
以下行在 Windows XP 上的 IE 8.0.6 上抛出“对象不支持此属性或方法”错误。我已研究过encodeURIComponent方法,但找不到其他人经历过此问题。这是我的吗这里有问题,还是必须有其他问题? 谢谢你!
request_type = encodeURIComponent(document.getElementById("request_type").value);
The following line is throwing a Object doesn't support this property or method" Error on IE 8.0.6 on Windows XP. I've looked into the encodeURIComponent method and I've been unable to find anyone else experiancing this. Is this my issue here, or does it have to be something else?
Thank you!
request_type = encodeURIComponent(document.getElementById("request_type").value);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它实际上可能在抱怨“.value”。
尝试像这样分解代码:
如果脚本在第二行终止,则意味着第 1 行正在尝试获取不存在的元素。
It might actually be complaining about ".value"
Try breaking the code up like this:
If the script dies on the second line, then that means line 1 is trying to get an element that doesn't exist.