Using开发者_JAVA技巧 this script to send id to file.php which queries database and returns output in #DIV,
function recp(id + page) {
$('#DIV').load('file.php?id=' + id + '& page=' + page);
}
works fine with just (id) but no luck with 2 variables. Checked on the appropriate sites without any result.
How would I also configure my Onclick=recp('$id ...')
Help much appreciated!
There is a space in your query string. It should be:
$('#DIV').load('file.php?id=' + id + '&page=' + page);
It is much neater to pass an object as second [data] parameter:
$('#DIV').load('file.php', {id: id, page: page});
精彩评论