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

ajax request interface returns the html of its own url

WBOY
Release: 2016-08-04 09:19:40
Original
1833 people have browsed it

$.ajax({

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

Reply content:

$.ajax({

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

There are only two possibilities:

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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template