0

是否可以使用 PHP 在 PHP 中传递变量onclick="location.href"

像href一样

echo "<a href='reply1.php?r_username=".$rows['comment']."&prod_id=".$row['prod_id']."'     class='reply_button'> REPLY </a>  ";
4

1 回答 1

2

将此示例用于您的解决方案

   window.location.href = "myphpfile.php?one=" + one + "&two=" + two;

如果你想要ajax请求:

    $.ajax({
       url: "myphpfile.php",
       method: 'get',
       data : {one:"one",two:"two"},
      success:function() {
      alert("hi to all");
      });
于 2013-09-20T03:58:29.570 回答