在页面test.php中,我像这样加载content.php:
$(document).on('click', '.test', function () {
$('#content').load('content.php');
});
在content.php中,我有这样的Jquery代码:
$(function() {
var nb = 10;
$(document).on('click', '.trigger', function () {
ale
你好,大师,这有点难解释,但我会试一试。
我有一个关于.live()函数在JQuery中的快速问题。我将简化这里的例子。我有一个页面"index.php“,它有一个容器"#display_files_container”,其中填充了由不同页面"process.php“动态生成的锚链接。当基于该链接的属性选择这些链接时,这些链接将加载到同一个<div>中。见例子:
INDEX.PHP
<html>
<head><title>index.php</title>
<!-- this function bel
我有个问题,这是我的密码:
<a href="Webshop.php" class="Button" onclick="myFunction()">Webshop</a>
<script>
function myFunction() {
var r = confirm("If you leave this page your purchase will be gone!");
if (r == true) {
window.loc
我正试图在Wordpress中通过点击一个链接来启动一个PHP函数。我已经设法通过表单提交完成了这项工作,但我想通过点击链接来完成。
我拼凑了一个AJAX请求,但它似乎不起作用-任何想法都非常感谢。
HTML链接代码
<a href="#link_id"> Ajax Click </a>
Javascript函数
<script>
// Create a function to pick up the link click
$('#link_id').click(function(event){
event.pre
为了避免在点击内部链接时网页被完全重新加载,我使用了jQuery和AJAX。
$(".ajax").click(function(e){
e.preventDefault(); // do not follow link
var requestPage = "content.php?" + jQuery(this).attr('href').split("?")[1];
$.get(requestPage, function(data){
$("#content").html
php和html
<?php
$param=$_GET['param'];
$sql= "SELECT * FROM categories,main_category WHERE categories.main_cat_id=main_category.main_cat_id AND categories.main_cat_id='$param'";
$stmt = $pdo->query($sql);
?>
<table class="small-12 medium-12 l
我同时在两个div中加载文件:#ajax_id和#ajax_col,问题是当我从一个已加载的div中创建另一个链接时,其他链接将不再起作用……这是我的代码:
$(document).ready(function() {
var api = $('#ajax_in').jScrollPane().data('jsp');
$('.aj4x').bind('click', function() {
var action = $(this).attr("rel");
api.getCo
我正在做一个项目,我想做以下事情:在主页上我有div,这是从数据库动态加载的div,现在当我点击div,我希望它重定向到新页面,然后加载相应的内容只,从数据库,就像一个博客网站,当你点击主页上的一篇文章,它从数据库加载新页面上的文章,我知道这必须是一个简单的过程,但我不知道如何写所有的代码,所以有人能帮助我吗?
提前谢谢你
这是我的主页:
<?php
require_once 'core/init.php';
include 'includes/head.php';
include 'includes/nav.php';
include &
使用数据,我使所有的<td>的点击。我如何告诉函数从前两行中排除单元格,因为我不希望这些单元格是可点击的。
function () {
var api = this.api();
api.$('td').click( function () {
api.search( this.innerHTML ).draw();
});},
我的桌子:
<table>
<thead>
<tr>