我正在使用jQuery来读取XML文件.有时XML是空的,我希望执行错误function(no_info),因为文件没有按照格式进行格式化dataType.
在IE 10中,执行错误功能.但是在Firefox(40.0.2)中,parse执行了成功函数().为什么两个浏览器的行为不同,哪一个是正确的?
$.ajax({
url: '/~play/shout.xml',
dataType: "xml",
success: parse,
error: no_info
});
Run Code Online (Sandbox Code Playgroud)