[英]How can i send two parameters using ajax url
i am trying two send two values to new page i am new to jquery how can i concatinate them: 我正在尝试两个将两个值发送到新页面我是jquery的新手,我该如何对其加以概括:
The Error is in location line ('') 错误在位置行('')中
here my ajax code: 这是我的Ajax代码:
success: function (response) {
if(response["success"]==true)
{
$("#showMessage").html(response['message']);
location = '/learningcurve/gdpi.php?jobid=='+response["id"]'&jobname=='+response["jobname"];
window.open(location);
You forgot to concatenate: 您忘记了串联:
'+response["id"]+'
Notice the +
. 注意+
。
try this one 试试这个
success: function (response) {
if(response["success"]==true)
{
$("#showMessage").html(response['message']);
location = "/learningcurve/gdpi.php?jobid="+response["id"]+"&jobname="+response["jobname"];
window.open(location);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.