简体   繁体   中英

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:

The Error is in location line ('')

here my ajax code:

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);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM