In the project, after ajax sends a request, a page is returned directly from the background instead of returning a status value.
The page returned may be the page entered after successful submission, or it may be an error page, or a page with abnormal status.
Originally, the prompt window in this regard was returned directly from the background, but now that the project is under secondary development,
we need to process the status window in the foreground, so lay.ui is used.
But the background does not return the status value, but directly returns to the page, so that the page is directly loaded into the pop-up box...
Is there any solution to this problem?
天蓬老师2017-07-05 10:50:44
First of all, you must know the status of the returned page,
For example, successful page, abnormal page or error page,
You can judge the status based on some contents of the page
success:function(html){
var status= $(html).find("xxxx")=="xxxx";
//
}