页面加载内容,内部内容时出现问题 [英] Problem with page loading content, inside content

查看:84
本文介绍了页面加载内容,内部内容时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您访问这里:示例您将看到我的问题.

页面加载,然后加载div id = content

中的所有相同内容

看看JS/jQuery的源代码,如果您需要PHP,请告诉我.我不太确定是使用JS还是PHP.我使用了 jQuery地址插件,所以也许我没有正确使用它,但这杀死了我./p>

关于我可能做错了什么的任何想法?在Firebug中,页面会加载,并且不会停止.如果有,请尝试一下.

感谢您的帮助!

解决方案

这行代码:

$('.content').load('http://laynestaley.co.uk/test/'+fragment+'?ajax=1');

实际上是将整个页面加载到<div class='content'></div>中.您的服务器端代码一定不能按照预期的方式执行该AJAX调用(只是再次加载/test/的索引页).

if you visit here: Example You will see my problem.

The page loads, then loads all the same content within a div id=content

Have a look at the source for the JS/jQuery and if you need the PHP just let me know. Im not too sure if its the JS or PHP that's doing this. I use the jQuery Address Plugin so maybe im not using it properly but this is killing me.

any ideas on what i could be doing wrong? in Firebug the page loads and simply doesn't stop. Try it out if you have it.

Any help is appreciated!!

解决方案

This line of code:

$('.content').load('http://laynestaley.co.uk/test/'+fragment+'?ajax=1');

Is actually loading the entire page into <div class='content'></div>. Your server-side code must not be executing the way you expect it to with that AJAX call (It's just loading the index page of /test/ again).

这篇关于页面加载内容,内部内容时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆