如何在Jquery中确定ajax调用的响应类型?有时,服务器发送json响应,有时它只发送html用于显示目的.现在我正在使用
if(response.indexOf('Error')) //popup error message else response.username response.address
ajax jquery
ajax ×1
jquery ×1