Ajax obtains the ID data, how to submit the data via post to the post page.
such as this, if Id= "ABC" Inside the show is: we and you ...
How can we and you this value by post to the test.php processing page to live this value
Reply to discussion (solution)
Baidu a bit, Ajax POST request a lot of, I generally use jquery ajax is very convenient
$.ajax ({
' type ': ' POST ',
' URL ': " createurl (' CTrain ')?>",
' Cache ': false,
' DataType ': "HTML",
' Data ': {' id ': ID},
' Success ': function (data) {
Data is the result of the return
$ ("#BgDiv"). Show ();
$ ("#show_data"). Append (data);
}
});
jquery Ajax Handy
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 do I get this data on the test.php page?
Print_r ($_get);