0

我需要所有这些以相同的方式运行,但我需要加载它以便在运行 up.php 时页面停留在 index.php 上......有人有什么想法吗?预先感谢您的任何帮助!

<div id="left">
<span class='up'><a href="up.php?key1=<?php echo $mes_id1; ?>&key2=<?php echo $mes_id2 ;?>" class="" id="<?php echo $mes_id1; ?>" name="up"><img src="up.png" alt="Down" /></a></span><br />
<?php echo $totalvotes1; ?><br />
</div>
4

1 回答 1

2

使用 jquery 像这样尝试

$('.up a').bind('click', function(e) {           
  var url = $(this).attr('href');

  e.preventDefault(); // stop the browser from following the link

  //make ajax call
  $.ajax({
   'url' : url ,
   'type' : 'GET',
   'success' : function(data) {
   }
   });
});
于 2013-02-17T08:32:29.560 回答