jQuery Ajax method data parameter send a Number
excuse my bad english first,
im using ajax call and the code goes like this :
$.ajax({
url:'fetch.php',
type: 'GET',
**data: { temp : 'counter' },**
success: function(data){
$('#rules2').append(data);
}
The problem is that i want the counter to be a number...i gave already set it as var counter = 1; but what it does is to just send the string "counter".
Any help for this?
What i want to do is to get some data from the db with the fetch.php file and get that data by th开发者_C百科e id ...so id is a number and i need to send a number with ajax method.
Thx
$.ajax({
url:'fetch.php',
type: 'GET',
data: { temp : counter }, // Note the missing quotation marks
success: function(data) {
$('#rules2').append(data);
}
精彩评论