Php 在javascript中通过window.location传递数据

Php 在javascript中通过window.location传递数据,php,javascript,Php,Javascript,我试图通过window.location传递数据,数据以del(id、img、album)形式提供 我想通过window.location发送多个值 window.location="save.php?type=deldownload&album="+album&id="+id; 但这不起作用,但下面的代码起作用 function del(id,img,album){ var where_to= confirm("Do you really want to dele

我试图通过window.location传递数据,数据以del(id、img、album)形式提供

我想通过window.location发送多个值

 window.location="save.php?type=deldownload&album="+album&id="+id; 
但这不起作用,但下面的代码起作用

function del(id,img,album){
    var where_to= confirm("Do you really want to delete "+img+" image");
    if (where_to== true)
    {
         window.location="save.php?type=deldownload&id="+id; 
    } 
    else
    {
         alert('Ok! You Can continue with this Album');
    }

}
请告诉我真正的问题是什么。

你遗漏了几句话

window.location="save.php?type=deldownload&album="+album+"&id="+id;