我在互联网“投票系统”上找到了一些脚本,我想稍微修改一下,所以我有这段代码:
$.post(
"voting/voting.php?value="+a,
{ },
function(response) {
// now update box bar
$.post(
"voting/update_box.php",
{ },
function(update){
$('#update_count').html(unescape(update));
}
);
////////////
// now update tooltip count
$.post(
"voting/update_tooltip.php",
{ },
function(updates){
$('.tooltip3').html(unescape(updates));
}
);
////////////
}
);
您在第一行中看到voting/voting.php?value="+a
,我想在video
其中添加另一个值 - 将存储id
当前视频的位置,并将其voting.php
与value
.
我试过这个(我将视频存储id
为带有类的 div 的 id .tooltip
,我知道这有点奇怪,但我认为它应该可以工作):
var b = $(".tooltip").attr("id");
$.post("voting/voting.php?video="+b+"&value="+a, {
但这不起作用。有什么建议么?