0

I'm trying to build a url with search parameters. So far I have this function written so that when a user clicks the search button it runs this query on a jobs search page.

How do I add these variables to the URL? Thanks for any help you can give.

function Search(){
    let startDate = $("#startdate").val();
    let location = $("#location").val();
    let profession = $("#profession").val();
    let specialty = $("#spieciality").val();
    
    const myUrl = new URL("https://thstravel.com/jobs?search=true");

    window.location.href = url;
    }

0 Answers0