我希望通过jQuery将ID传递给urlstring,而不需要刷新jQuery和#标记,这样就可以通过php $_get['ID']函数获得ID。
但问题是
如果我使用#,页面就不会刷新,但是PHP会从url中选择ID。
如果我不使用#,那么php会选择ID,但是Page会被刷新。
我想在不刷新页面的情况下将id传递给php。
//javascript
function com(id) {
location.href = '#?ID=id'; //by this way way,page doesn't refresh, ID a
我有一个默认控制器:
类Home扩展CI_Controller {
public function index()
{
$data['content']='discover';
$this->load->view('layouts/master', $data);
}
public function categories()
{
$this->load->view('categories');
}
}
在单击时,使用AJAX,我能够加载视图c
我有一个php页面,在页面的中间有第二个php页面,类似于下面:
<?php
main content page
<?php include 'db-info.php';?>
more content
?>
db-info.php显示一个包含来自数据库的信息的表。当数据库更新时,我希望主页显示更新的结果。如果我有一个独立的db-info.php页面,我可以让它刷新,但我不知道如何让db-info.php刷新,当它包含在主内容php页面中时。
我不希望经常扫描数据库的更改来触发刷新,因为只有在单击按钮时才会更新数据库。关于如何链接按钮单击或数据库更新以使d
我想用ajax刷新div,但是当我从mysql中选择项时,它不会刷新页面。以下是我的代码
INDEX.PHP页面
<script type="text/javascript">
$(document).ready(function() {
$.ajaxSetup({ cache: false }); // This part addresses an IE bug. without it, IE will only load the first number and will never refresh
setInterva