首先,让我向所有提供答案的人表示感谢...我肯定已经取得了进步,甚至在我的本地机器上一切都运行良好.
但是它不能在服务器上运行.我尝试了很多东西,例如将session_start()放入包含的文件中但没有采取任何措施.
而不是在这里发布代码我已经压缩了几个文件:
http://nerotic.net/aux/code.zip
并且您可以在同一URL上看到删除/code.zip的网站
index.php:其中包含AJAX ... index_page_content.inc.php:是我的文件,用于确定包含哪些内容backend.php:用于处理AJAX声音的PHP-how.php:包含的一个页面通过index.php
这种行为很奇怪.它不会回显'src'我回应它的地方,但是它会在我回显'section'的地方显示它.但是一旦我重新加载它就会回到同一个地方的"部分".
此外,在Chrome中,我点击的每一个链接都会重新加载整个页面.
所以如果有人能告诉我我做错了什么:)
提前致谢.
原始邮政
我是PHP的新手并重新学习JS所以任何帮助都会受到赞赏.
<script language="JavaScript"
type="text/javascript">
$(document).ready(function() {
$("div.tabs").tabs(".images > div", {
// enable "cross-fading" effect
effect: 'fade',
fadeInSpeed: 600,
fadeOutSpeed: 1000,
// start from the beginning after the last tab
rotate: false
// use the slideshow plugin. It accepts its own> configuration
}).slideshow({autoplay: false, interval:5000});
$("a.lnav").onclick(function() {
// Get the ID of the link
var src = $(this).attr("id");
alert(id);
// Send Ajax request to backend.php, with src set as "id in> the POST data
$.post("/backend.php", {"id": src});
});
}); </script>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
476 次 |
| 最近记录: |