XMLHttpRequest 的默认 URL [英] Default URL for XMLHttpRequest

查看:32
本文介绍了XMLHttpRequest 的默认 URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与没有 action 属性或为空属性的

类似,带有空字符串的 XMLHttpRequest 是否是一致且可靠的行为?URL 参数会请求当前的 URL?

Similarly to how a <form> with either no action attribute or an empty one, is it consistent and reliable behaviour that an XMLHttpRequest with en empty string given to the URL parameter will request the current URL?

推荐答案

经过实验,似乎答案是否定的.实际上,URL 参数是必需的,会导致错误.

After experimentation, it appears the answer is "No". In fact, the URL argument is required and will cause an error.

这篇关于XMLHttpRequest 的默认 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆