Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/471.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Ajax随机加载远程页面的全部或部分内容?_Javascript_Php_Jquery_Ajax - Fatal编程技术网

Javascript Ajax随机加载远程页面的全部或部分内容?

Javascript Ajax随机加载远程页面的全部或部分内容?,javascript,php,jquery,ajax,Javascript,Php,Jquery,Ajax,我的编码有一个确切的问题: 从页面.php我使用Ajax加载模板.php的内容 问题是,有时它正确地显示了_template.php的完整内容,有时则不正确。奇怪的是,当我通过“inspect元素”点击响应时,我看到每次都加载了全部内容,但部分内容显示在实际页面上 如果我点击refresh,有时它是完全加载的,但有时不是 有人对可能出现的问题有任何线索吗 页面.php $.ajax({ url: "url here", cache: false, dataType: "h

我的编码有一个确切的问题:

页面.php
我使用Ajax加载
模板.php
的内容

问题是,有时它正确地显示了_template.php的完整内容,有时则不正确。奇怪的是,当我通过“inspect元素”点击
响应时,我看到每次都加载了全部内容,但部分内容显示在实际页面上

如果我点击refresh,有时它是完全加载的,但有时不是

有人对可能出现的问题有任何线索吗

页面.php

$.ajax({
    url: "url here",
    cache: false,
    dataType: "html",
    success: function(data) {
        $('#currTabTarget').html(data);
    }
});
html and js code
_template.php

$.ajax({
    url: "url here",
    cache: false,
    dataType: "html",
    success: function(data) {
        $('#currTabTarget').html(data);
    }
});
html and js code
检查元件的响应

It loads the full code everytime, as it should be

这是wordpress吗?如果是这样,考虑添加TEH WordPresstag@Orangesandlemons没有wordpress,只是Scratch中的简单代码。您是否在没有
数据类型:“html”、
@codenut的情况下尝试过它?是的,一点也没有区别。这是wordpress吗?如果是这样,考虑添加TEH WordPresstag@Orangesandlemons没有wordpress,只有Scratch中的简单代码。您是否在没有
数据类型:“html”、
@codenut的情况下尝试过它