且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用.load()将多个变量传递给URL

更新时间:2023-02-25 14:56:19

我相信Amin已经回答了您的问题,但我只是想根据

I believe Amin has already answered your question but I just wanted to add that according to the .load() documentation, you can pass your data as the second argument and it should handle the encoding. So you could do something like this:

var pageVal= <?=$_GET['page']?>;
var data = { "topicid": $(this).data('topicid'), "page": pageVal };
$('span.user-topicid').load('get_number_comments.php', data);