我想用此代码发送一个值。我怎样才能做到这一点?首先在此页http://localhost/abc/pagi/中发送了该值。然后我得到了价值并运行SQL然后需要这个代码。我正在尝试,但我的代码不起作用。谢谢!
jQuery(document).ready(function() {
jQuery("#results" ).load( "http://localhost/demo/pagi/"); //load initial records
//executes code below when user click on pagination links
jQuery("#results").on( "click", ".paginationss a", function (e){
e.preventDefault();
jQuery(".loading-div").show(); //show loading element
var page = jQuery(this).attr("data-page"); //get page number from link
jQuery("#results").load("http://localhost/demo/pagi/",{"page":page}, function(){ //get content from PHP page
jQuery(".loading-div").hide(); //once done, hide loading element
});
});
function searchFilter(page_num) {
page_num = page_num?page_num:0;
var keywords = jQuery('#curent_user_mail').val();
jQuery.ajax({
type: 'POST',
url: '/demo/pagi/',
data:'page='+page_num+'&keywords='+keywords
});
}
});