MCQs > IT & Programming > JQuery > Is there a way to show custom exception messages as an alert in a jQuery Ajax error message?

JQuery MCQs

Is there a way to show custom exception messages as an alert in a jQuery Ajax error message?

Answer

Correct Answer: jQuery.ajax({// just showing error property error: function(jqXHR,error, errorThrown) { if(jqXHR.status&&jqXHR.status==400){ alert(jqXHR.responseText); }else{ alert("Something went wrong"); } } });

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JQuery Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JQuery Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it