2012-09-21 56 views
3

我想通过window.location传递数据,数据在del(id,img,album)中可用。通过JavaScript中的window.location传递数据

我想通过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'); 
    } 

} 

请说出真正的问题是什么。

回答

6

你缺少一些报价

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

感谢它的工作原理... – user1688258

+0

很大:-)高兴帮助 – Miroslav