Home  >  Article  >  Backend Development  >  ajax request interface returns the html of its own url

ajax request interface returns the html of its own url

WBOY
WBOYOriginal
2016-08-04 09:19:401502browse

$.ajax({

<code>        type: "post",
        URL: href+'/demo/showPageNewMesssage',
        data: {
            p: recoIndexObject.pageNumber
        },
按理说应该href+'/demo/showPageNewMesssage'响应数据的,为什返回的是触发ajax 的元素所在页面的html信息。</code>

Reply content:

$.ajax({

<code>        type: "post",
        URL: href+'/demo/showPageNewMesssage',
        data: {
            p: recoIndexObject.pageNumber
        },
按理说应该href+'/demo/showPageNewMesssage'响应数据的,为什返回的是触发ajax 的元素所在页面的html信息。</code>

There are only two possibilities:

<code> 1.后台接口问题
 2.如果你访问成功过,是返回的数据,这次又不行了,肯定是写错了
 3.你可以把你的参数key值引起来,试试</code>

Open the console and check if there is any error in the URL you requested

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn