How to submit the id data obtained by ajax to the post page through post. How to submit the id data obtained by ajax to the post page through post.
For example, if id = "abc" shows us and you...
Could you tell me how to submit this value to the test. php processing page through post to get this value?
Reply to discussion (solution)
Baidu, there are a lot of ajax post requests. I usually use jquery ajax for convenience.
$. Ajax ({
'Type': 'post ',
'URL ':" Createurl ('ctrain')?> ",
'Cache': false,
'Ype Ype ': "html ",
'Data': {"id": id },
'Success': function (data ){
// Data is the returned result
$ ("# BgDiv"). show ();
$ ("# Show_data"). append (data );
}
});
Jquery ajax ease of use
Var abc = $ ("# abc" ).html ();
$. Post ("test. php", {value: abc },
Function (data ){
// Do
});
Var abc = $ ("# abc" ).html ();
$. Post ("test. php", {value: abc },
Function (data ){
// Do
});
$ (Function (){
$ ("# Tit"). blur (function (){
$. Ajax ({
Url: "check. php ",
Type: "GET ",
Data: "tit =" + $ ("# tit"). val (),
Success: function (data)
{
$ ("# Chk" ).html (data );
}
});
})
})
How can I obtain the data on the test. php page ..
Print_r ($ _ GET );